Search code examples
mobileuser-agentdevice-detection

Mobile device identification from http headers


I have a large data-set containing HTTP Header information taken from network measurements. I need to use the UserAgent present in those headers to identify whether the useragent is for a Desktop or a Mobile Device or anything else. After doing that I need to identify the particular mobile device and perform further analysis on these device types.

So, can someone tell me a comprehensive free database of mobile devices. Preferably, there should be an easy interface to match these user-agent strings and get the device information. I primarily work in Perl.


Solution

  • HTTP::BrowserDetect might be helpful here. In particular, there is a mobile() method that might help you. The module seems pretty current on UA strings, although it's impossible to be completely up-to-date at any given moment (unless there is a 100% accurate, live repository of all UserAgents in the wild..).