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");} Code (markup): Thanks for your help! -Chris
Here ya go: http://www.useragentstring.com/pages/useragentstring.php There are other lists available, just search.
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?
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.
have you tryed handsetdetection.com? It detects the browser and then returns data back like screen size and device browser capabilities.
We can detect the mobile browsers using the user agent at header. In PHP we have to save the mobile operator name in array compare the current user agent with the array if it match we can say the client using which mobile browser. Here the code to detect mobile browser php