Looking at that user agent, I'd have to say that, that would be extremely difficult to differentiate from a non-handheld device.
The problem with browser detection is that it's obviously easy to tweak the user agent string, and thus you never really know if what the server is telling you is honest or not.
You have two options in this case:
You can check every single header the phone sends and maybe see if there is one that could make it unique
Or find some type of work-around by testing page load time etc..., As a whimsical example, browsers on handheld devices usually render pages a bit slower than their desktop counterparts, so after testing every possible mobile device with something like:
-
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) {
// some code..
}
You can see if a page with nothing else but a simple script is not loading in it's ideal time.
You get the point.
Also, try going here and see if it can detect you: http://detectmobilebrowsers.com/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…