daniel27lt Posted April 1, 2012 Share Posted April 1, 2012 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.