Mobile device detection
Our prospects and customers often ask us how to detect mobile devices and serve optimised content. This post briefly outlines some of the approaches.
DeviceAtlas is a commercial offering for detecting mobile devices.
The data it holds on devices is extremely comprehensive. Covering everything from, operating system version, form factor (mobile, tablet, TV, etc.), pixels, color depth, whether flash is supported and which elements of HTML5 are supported, e.g. GEO location, local storage, etc.
DeviceAtlas is available as a cloud service and as an enterprise local install.
Handset Detection is a commercial offering with various pricing tiers including a free plan. Their product is available as a cloud service and local installation.
The Handset Detection API is available in multiple languages including, PHP, Ruby, Python, ASP.NET, Java and ColdFusion.
Their website is nicely designed with clear friendly documentation. The full list of features can be found here
Some people will find the stats and analytics of interest.
WURFL, the Wireless Universal Resource FiLe, is a Device Description Repository (DDR), i.e. a software component that maps HTTP Request headers to the profile of the HTTP client (Desktop, Mobile Device, Tablet, etc.) that issued the request.
WURFL achieves an optimal balance among accuracy, speed and memory consumption through the combination of API logic and custom XML schema for the representation of device profiles in XML format. Thewurfl.xml file (i.e. the repository) contains that definition of thousand of devices.
WURFL claim that their product is deployed by the likes of Facebook, Google and carriers around the globe.
WURFL provide APIs for, Java, PHP and ASP.Net under the AGPL. If you wish to use WURFL commercially you need to contact ScientiaMobile to discuss your requirements.
The MobileESP Project
The MobileESP project seeks to provide web site developers an easy-to-use and lightweight API for detecting whether visitors are using a mobile device, and if so, what kind. The APIs provide simple boolean results for identifying individual device categories (such as iPhone, BlackBerry, Android, and Windows Mobile), device capabilities (e.g. J2ME), and broad classes of devices (iPhone/Android/WebOS) and smartphones. The API is available for most languages, i.e. PHP, Java, Python, ASP.NET, etc., and there are community ports for Ruby and Classic ASP.
The MobileESP project code is lightweight and ideal for many web sites. However, this project is not meant to replace other projects offering greater specificity and control, such as WURFL or HandsetDetection.com.
The good news is it is free and available under the Apache License 2.0.
Detect Mobile Browsers
Detect Mobile Browsers is a collection of simple scripts based on regular expressions that allow you to detect mobile devices. Scripts are available for virtually every language and web server. The scripts do not support querying the capabilities of the device. The scripts are free and unencumbered software.