Optimizing mobile device detection for your mobile site
Just read this on RWW, on how FaceBook optimized their mobile applications.
The cornerstone of this is detecting what your phone is going to be able to do. Capabilities, then you can start the right experience. You guys heard of WURFL at all? Wireless Universal Resource File? This is one of the projects out there that attempts to map a user to a user-agent set of capabilities. You know, what is your screen size? What is your JS? Can it do cookies? These are all pernicious, nasty problems that need to be solved. And the use-agent, as you guys can tell, doesn't do the job. So, you need an open database for manufacturers and concerned citizens to be able to tell you what is up. We sponsored this project and this project is continuing to evolve as an open source data site.
Last year while we were working on a mobile project based on the django framework (We were sub contracted so cant mention the client Hint: International Takeaway franchisor ;).
We needed to do some mobile device detection and change the templates based on features the device supported i.e Javascript.
We implemented the a solution based on WURFL, PYwurfl and the mobile.sniffer libraries. Other than some strange side effects on caching caused by django template switching based on a user agent everything worked fine for the most part(I may cover how we resolved this in a later post).
However, due to how some of these libraries were implemented, there was a significant hit in responsiveness & increase in memory usage when mobile device detection was enabled.
We did optimize this and get around the issue, however in January i presented this as a problem to MIGSA 2011 (Mathematics in industry Study Group) at WITS University. You can find the paper below.
Also well done to the students involved.





