Email This Post Email This Post Print This Post Print This Post

Moble Phone Detection

Fri, Sep 5, 2008 – 9:30 pm

Every moble phone script detection that I have run across (server side or client side) all seem to want to check user agent against a long long long long long list of values.

What’s wrong with simply checking screen width ? In my opinion there is a 99% probability that anything with a width of 640 or under is a mobile device.

Sure this will not tell anything about the capabilites of the browser (CSS/JavaScript/ect support) – but knowing it’s a cell phone would certainly give you a chance to know you have a low bandwidth device with a small screen – so don’t make them download your 1024×100 jpg page banner or the 1024×764 full page photos of your pet dog.

Post a Comment