Debt Consolidation - Web Hosting - Myspace Layouts - Acs Student Loans - Free Advertising

PDA

View Full Version : Mobile Browser Detection


chrisfromboji
Jun 29th 2008, 8:08 pm
Hey,
I'm working on a mobile website and need some help with my mobile browser detection script. I have it working for iPhone, iPod Touch, and Windows Mobile Devices.

I need help getting it to detect for Blackberry Browser (Blackberry Devices), Blazer Browser (Palm Devices), Opera Mini Browser, Opera Mobile Browser, and other mobile browsers if possible.

Does anyone know how to modify (and test if you have a phone to test with, as I don't have all of these devices) this javascript?:

if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))
{location.replace("mobile.html");}
if((navigator.appVersion.indexOf("Windows CE")>0))
{location.replace("mobile.html");}


Thanks for your help!
-Chris

Social.Network
Jun 29th 2008, 8:14 pm
Here ya go:

http://www.useragentstring.com/pages/useragentstring.php

There are other lists available, just search.

chrisfromboji
Jun 29th 2008, 9:23 pm
I looked at that site and it doesn't seem to have any mobile browsers. When I do get the agent strings for these mobile browsers, how do I implement the strings for detection of the whole platform or version spectrum?

Social.Network
Jun 29th 2008, 9:29 pm
Mobile Browser ID Strings:

http://www.zytrax.com/tech/web/mobile_ids.html

The problem in detection is that vendors are not consistent, so the name and version naming may change.

handsetdetection
Jul 9th 2008, 11:54 pm
have you tryed handsetdetection.com?

It detects the browser and then returns data back like screen size and device browser capabilities.