...

View Full Version : Mobile Browser Detection



chrisfromboji
06-30-2008, 04:08 AM
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

davemanjra
07-10-2008, 08:07 AM
for handset detection, mobile screen size and mobile phone capabilities, it might be worth you checking out www.handsetdetection.com

They have a service which you can link into your website. after the mobile browser is detected, you can then display the appropriate view for each device.

ifuschini
07-30-2009, 09:15 AM
I have published the last version(2.04) of "Apache Mobile Filter", this open source project has in the first seven months, more than 900 downloads from sourceforge and I suppose the same from CPAN.

The Apache Mobile Filter allows you to access WURFL from any programming language, not just Java and php that is traditionally used for dynamic mobile web sites.

The module detects the mobile device and passes the WURFL capabilities on to the other web application as environment variables. It can also be used to resize images on the fly to adapt to the screen size of the mobile device.

Try it and let me know your opinion.

For more info: http://www.idelfuschini.it/it/apache-mobile-filter-v2x.html

I have made two test pages:

PC Test Page: http://apachemobilefilter.nogoogle.it/php_test.php

Mobile Test Page: http://apachemobilefilter.nogoogle.it

mlynn
07-09-2010, 09:11 PM
I have created this article on mobile browser detection and redirection using php. There is a download link for the examples that you may feel free to use. My example enables automatic redirection based on device type with the ability to let the user specify a preference for a page other than the default for their device using cookies.

http://www.mlynn.org/2010/06/mobile-device-detection-and-redirection-with-php/

Hope you enjoy!

Regards,
Mike

raymonddenis
12-17-2010, 10:05 PM
Where could i find a list of all mobile browsers ? I need to write a condition that will show the proper page depending on the user-agent. The javascript condition is easy but the list of mobile handsets is constantly changing :mad:
Anyway it could be valuable if someone would develop a feed that would maintain this list (of user-agents) up to date.


______________________
Assurance auto
(http://www.axa.ca/assurance-auto)

ifuschini
03-07-2012, 07:57 PM
I have post 2 years ago about Apache Mobile Filter, now there is several news about AMF.
My project now got a dedicate domain:

http://www.apachemobilefilter.org

a wiki:

http://wiki.apachemobilefilter.org

and support 3 of common used device repository 51Degrees, DetectRight and WURFL.

webdev1958
03-08-2012, 10:33 AM
One option is to use Media Queries to assign stylesheets according to the device the visitor is using.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum