I’m curious to know how to check for iPhone, iPad and other mobile browsers.(JavaScript or CSS)
Edit:
Not user agent string, please. That can be faked.
Possible Dupes:
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Basically you check the User Agent String
see http://www.hand-interactive.com/resources/detect-mobile-javascript.htm
Detect iPhone:
In general feature detection is better than browser detection it is better to know what the user’s browser can do than what he’s using. Modernizer is a good tool for that.