4 ms·
"Mobile browser detection is really hard. None of the reports I've read so far show how they detect browsers." From my experience it's pretty easy, here's one
by ronaldj 17y ago
"Mobile browser detection is really hard. None of the reports I've read so far show how they detect browsers."
From my experience it's pretty easy, here's one way to do it:
<link rel=”stylesheet” href=”mobile.css” media=”only screen and (max-device width:480px)” />
http://www.w3.org/TR/css3-mediaqueries/ http://www.w3.org/TR/css3-mediaqueries/
- pyre 17y agoThis test will only tell you "this is a mobile browser." It will not tell you "this is an iPhone browser and not a BlackBerry browser." That's the kind of detection that he's talking about. Notice that part where he talks about mobile browser developers spoofing the iPhone user agent string to get to a 'mobile' version of a web page and how this might skew 'MobileSafari' penetration numbers if this is not accounted for.