Social

Monday, June 16, 2014

HTML redirect to mobile web page automatically



When the user or the client visit your website, if they see your web without any responsively it might be problem. Because the contents are may be not in the right places. So the right and most used way is to redirect them to separated mobile page. So here is the simplest source code to do that (in a javascript).


 if (document.location.search.indexOf("skipmobile") >= 0) { 
 document.cookie = "skipmobile=1"; 
 } 
 else if ((document.location.hostname.match(/\.mobi$/) || screen.width < 699) 
 && document.cookie.indexOf("skipmobile") == -1) 
 { 
 document.location = "mobile/"; 
 } 

1 comment:

  1. Html Redirect To Mobile Web Page Automatically - Rocknirmana >>>>> Download Now

    >>>>> Download Full

    Html Redirect To Mobile Web Page Automatically - Rocknirmana >>>>> Download LINK

    >>>>> Download Now

    Html Redirect To Mobile Web Page Automatically - Rocknirmana >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete

 

Search This Blog

Most Reading

Protected by Copyscape Duplicate Content Software

Facebook Page