The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Mobile Browser Detection

I have noticed a number of sites when accessed with a mobile browser such as a treo redirect you to a mobile version.  Others serve back the normal site and rely on you to access their mobile site.

1) Is it good practice to try and detect the device?  How best is this done (I imagine smoe sort of javascript)?

2) Is there a resource out there which has a listing of web sites along with their mobile freienly URLs?

Richard Gardner Send private email
Friday, July 13, 2007
Depending on the request headers you could write a .htaccess or equivalent rule to redirect the user to a mobile friendly variant of the site.

Some sites also use CSS files with appropriate media types set.
Dan Fleet Send private email
Friday, July 13, 2007
If you have a version of the site optimized for mobile devices then automatic redirect is ok.  But detecting  mobile devices is tricky.  User-agent alone is not 100% accurate.
Jeff Zanooda Send private email
Friday, July 13, 2007
If you make a mobile version, please make sure you provide a way for the user to get to the non-mobile version.  Mobile versions are definitely appreciated but it's incredibly annoying as a Windows Mobile user to be forced to a bare bones mobile version of a web site when I have a browser that can handle the full HTML without much difficulty.
SomeBody Send private email
Saturday, July 14, 2007
No, it's not done via Javascript... most of the distinguishing characteristics are in the request headers.  You can go about it two different ways.... you can do *device* detection and figure out "oh, this guy has a blackberry, here do this" or you can see what their browser supports (xml, xhtml, etc) and redirect appropriately.

Yes, there is a service called WURFL - - but it's not the most accurate or up to date.

My biggest customer for the past 2.5 years is *very* active in the mobile space so I've learned more than I will ever need... and ended up building the mobile sites for a few big names.
KC Send private email
Saturday, July 14, 2007
Here is my own collection of mobile alternatives, I think it's what you're looking for:

I agree this is a huge problem and there needs to be some sort of standard for mobile alternates, much like the RSS link standard came about. The problem with content-based solutions like link or meta tags is that by the time the mobile browser can finally read/parse them, too much data has been downloaded and the browser crashes.

Sites like do server-side redirection for mobile clients, but as has been mentioned, that is sometimes less than ideal because of reduced functionality.
Barnabas Kendall Send private email
Thursday, July 19, 2007

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz