daniel27lt Posted April 1, 2012 Share Posted April 1, 2012 (edited) If anyone is wondering how to redirect to a mobile site then this will be for you. This is a code that will automatically redirect from any page you place the code on. Its great for people who use mobile devices and come across your site, automatically they will be redirected. How is this so? Within the code you see "600", this means when a vistors via there mobile devices comes upon your site that is larger (your sites page width) then 600 will be redirected to your mobile site. <script type="text/javascript"><!--if (screen.width <= 600) {document.location = "mobile.html";}//--></script> Remember, change mobile.html to your mobile site and I would just leave the 600. I hope this has helped. Edited April 1, 2012 by daniel27lt Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now