Hello, i searched a lot for a javascript code that detect that visitor is coming from Mobile Device and redirect his to another url anybody know how to do this ??
You need to use an if statement that checks the browser and then redirects if that if statement is true. The first part is answered here: http://stackoverflow.com/questions/11381673/javascript-solution-to-detect-mobile-browser So you have a function like: function isMobile(){ //if yes return true, else return false. Copy/paste code from above url } if (isMobile){ window.location.href='your_url'; }
Detect the browser window size, then send an appropriate page. A 10" netbook and a 10" tablet should get the same page. Detecting only mobile browsers will send a 10" netbook a page designed for a much larger display.