0

Possible Duplicate:
Auto detect mobile browser (via user-agent?)

Ok so i made this mobile version for my website which is at mobile.mysite.com but how do i get it so that when users go to mysite.com from any mobile device (ipads,ipods,cellphones, etc....) that it goes to mobile.mysite.com

Community
  • 1
  • 1
Mihad Aiko
  • 909
  • 2
  • 11
  • 12

2 Answers2

0

Consider using modernizr to determine if the client has touch events then redirecting to mobile.mysite.com

You could also detect the resolution of the device, but this is becoming less helpful since phones now have HD resolution screens.

If you're using php consider using this script

Mark Meyer
  • 3,643
  • 3
  • 23
  • 34
0

You can go the route of using CSS3 media queries and responsive design or you can can use some sort of JavaScript library like device.js to check which phone the user is using and which features it has available.

Josh Bedo
  • 3,410
  • 3
  • 21
  • 33