Building mobile web sites: device detection
I want to write a series of blog posts giving recognition and thanks to 3rd party and open source tool sets that allow the production and management of mobile web sites. The first topic is device detection.
One of the first problems we tackled in building our framework was device detection and how to do it. Initially we built our own detection grid – this was a mistake as it was very hard to scale and work out what we were going to be testing. In time we decided that WURFL was the better solution.
It is by no means perfect but has proved to be very robust bar the odd glaring exception e.g. classing the Blackberry 9800 as not being an advanced browser in the same class as the native Android browser.
WURFL stores profiles for ~14,000 devices. We use these device profiles to create 4 versions of our mobile microsites. These range from supporting advanced CSS and AJAX through to not even supporting all HTML tags.
The basic mechanism when a user loads our page is:
1. Match the user agent against a device
2. Match the device against a profile
3. Serve up the site version that was designed to run for this profile
Having these profiles has also helped identify and simplify our testing requirements.
This entry was posted on Friday, December 10th, 2010 at 16:24 and is filed under General. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.