No device detection script will always be 100% accurate. With new devices coming out everyday and some sub-par user agents from days ago, the truth is, there will always be some inaccuracy in device detection. It’s important to audit your device detection script from time to time to see how accurate your results are. I’ve cross-checked Categorizr with data from WURFL along with checking some user agents from useragentstring.com, http://www.zytrax.com/tech/web/mobile_ids.html, and a few other places across the web. Though it’s impossible to collect every user agent to test, I feel like I’ve got a decent amount collected and I am pleased with the results I’ve gotten from cross-checking Categorizr. Though I did find some oddities. Below are issues I’ve discovered with Categorizr. While it looks like there may be a lot of issues judging by the length of this post, most of this post is about the issues I came across in testing Categorizr and how they have been solved.

Issues with Desktop Detection.

There a select few older Windows Mobile devices that when using Opera Mobile, were incorrectly categorized as being desktops. This issue has now been resolved and these devices are now detected as mobiles. You can read more on the issue here: Odd Opera based user agents.

Issues with TV Detection.

A category for TVs has been added to Categorizr. Smart TVs and TV based gaming consoles like the Nintendo Wii and Playstation 3 are now categorized as TVs. A few of the SmartTV’s categorized as a TV include Google’s Android powered TVs, Philips Net TVs, and Samsungs Smart TVs. Results so far for detecting smart TVs have been great, though as this is still fairly a new market, there may be some smart TVs or other TV based devices that slip through the device detection.

If you know of devices that are not categorized correctly, let me know and I’ll see what I can do to update Categorizr.

Issues with Tablet Detection.

Tablets are fairly easy to check for because most have them have the word tablet in some shape or form somewhere in the user agent string. I cannot stress how nice this is. I’d like to see this become a more standardized practice for tablet manufactures and browser vendors.

While checking for the word tablet in the user agent works for most tablets, Android tablets do not include the word tablet in their stock user agent. Google recommends to check for the word Android and the absence of the word mobile in the user agent when checking to see if a Android device is a tablet. This actually works rather well for the most part, but there are some Android Tablets, mainly 7 inch, pre Android 3.0 devices that fall through the cracks with this method.

The Samsung Galaxy Tab 7, Dell Streak 7, Zenithink zt180, ViewSonic ViewPad7, Huawei IDEOS S7, Coby MID7015, Archos A101IT, Archos A70BHT, Nextbook Next2, Pandigital Nova, and Pandigital SuperNova are all pre Android 3.0 tablets that do not get detected by Google’s recommended way to detect tablets.

Instead, to catch these pre Android 3.0 tablets, Categorizr checks for the actual device ID. Thankfully, Google’s recommendation for detecting tablet devices works on all Andriod 3.0+ devices so far, so the list of tablets that Categorizr needs to actually check for the device ID should not be growing, though if you do come across a Android tablet you think is being incorrectly categorized as a mobile, let me know in the comments below.

In checking against WURFL, I noticed some oddities as far as mobile devices being categorized as tablets. The HTC Magic, Sony Ericsson X10i, HTC X06HT, Samsung SC-02B, and the Vodafone 945 were categorized as tablets. In each case, the user agent has the word Android and not Mobile in it. I believe these are cases where the user agent has been modified from the stock user agent.

For example, the HTC Magic user agent recognized as a tablet was:
Mozilla/5.0 (Linux; U; Android 1.5; sv-se; HTC Magic Build/CUPCAKE) AppleWebKit/528.5+ (KHTML, like Gecko)

Here is another user agent for the HTC Magic, in this case, Categorizr correctly recognizes it as a mobile instead of a tablet.
Mozilla/5.0 (Linux; U; Android 1.5; da-dk; HTC Magic Build/CUPCAKE) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1

To catch these oddities, Categorizr manually checks for the device ID on these select few mobiles to make sure they get categorized as mobile, not tablet.

Firefox Mobile/Fennec pre 10.0
Another cause of false positives happens with users who are on Firefox Mobile on tablets, prior to Firefox Mobile 10.0. Firefox just recently launched Firefox Mobile 10.0, which has a new feature that allows users to change their user agent. Before 10.0, the user agent on Android tablets was no different than on Android mobile phones.

Firefox Mobile 8.0 and 9.0 user agent on Android phone
Mozilla/5.0 (Android; Linux armv7l; rv:8.0) Gecko/20111104 Firefox/8.0 Fennec/8.0
Mozilla/5.0 (Android; Linux armv7l; rv:9.0) Gecko/20111208 Firefox/9.0 Fennec/9.0

Firefox Mobile 8.0 and 9.0 on Android Tablet
Mozilla/5.0 (Android; Linux armv7l; rv:8.0) Gecko/20111104 Firefox/8.0 Fennec/8.0
Mozilla/5.0 (Android; Linux armv7l; rv:9.0) Gecko/20111208 Firefox/9.0 Fennec/9.0

The ability to choose your user agent in Firefox Mobile 10.0 is a huge plus for users. Categorizr correctly categorizes all of the new possible user agents introduced in Firefox Mobile 10.0.

Opera Mini on Android Tablets
This false positive is similar to pre Firefox 10.0. As you can see below, there is nothing to differentiate Opera Mini on an Android tablet from an Android mobile phone.

Opera Mini on Android Tablet
Opera/9.80 (Android; Opera Mini/6.5.27452/26.1283; U; en) Presto/2.8.119 Version/10.54

Opera Mini on Android Phone
Opera/9.80 (Android; Opera Mini/6.5.27452/26.1235; U; en) Presto/2.8.119 Version/10.54

Opera Mobile has a feature where users can change their user agent. It would be nice to see this feature added to Opera Mini. My thoughts are if a user wants to use Opera Mini on their Android tablet, they might be trying to keep their data usage low. In this case, categorizing Android tablets with Opera Mini as mobiles would help in keeping their data usage low. I’ll admit, I’d like to differentiate between the two, but with nothing to differentiate the two in the user agent strings, it will take Opera to fix this false positive.

Whats an iProd?

Another oddity I found in looking at user agents from WURFL, was this little gem.
Mozilla/5.0 (iProd; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko)

Notice the iProd. This really isn’t an issue, just an oddiety I noticed when comparing against user agents in WURFL, so thats why the word iProd is in Categorizr.

Other edge cases/false positives.

The Nokia N800 causes some false positives if you are not using the stock browser. Of the 102 user agents I checked for the N800 over at Handset Detection, all of them were categorized as mobile. While the Nokia N800 may have been marketed as an “internet tablet” when it was announced in 2007, to me, the device falls more inline with other mobile devices Categorizr recognizes, so having the N800 categorized as a mobile is okay with me.

However, I did noticed some false positives when I came across 4 unique user agents from Zytrax which seem to be from thrid-party browsers on the N800 rather then the stock browser. These user agents were categorized as desktops.

  • Mozilla/5.0 (X11; U; Linux armv6l; en-us) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) tear -  Tear 0.3 (Beta) on Nokia N800 under Maemo.
  • Mozilla/5.0 (X11; U; Linux armv6l; en-US; rv: 1.9.1a2pre) Gecko/20080813221937 Prism/0.9.1 -  Prism on a Nokia N800 tablet under OS2008
  • Links (2.1pre31; Linux 2.6.21-omap1 armv6l; x) - Links 2.1 preview 31 on a Nokia N800 tablet under OS2008.
  • Mozilla/5.0 (X11; U; Linux armv6l; en-us) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) midori -  Midori on Nokia n800 tablet device.

I must admit, I’m not too familar with third-party Nokia mobile browsers, so if anyone has more information about these, I’d be glad to hear about it. The issue I have is that I am unsure if I can set up keywords to catch, Tear, Prism, Links, and Midori and always assume that if those are in the user agent, then it’s a mobile device.

In looking more into Tear, it does look like it would be safe to set up a check to catch user agents with Tear in it as mobile. If you know otherwise, let me know in the comments below.

As far as the N800 user agents with Prism and Links in them, I couldn’t find much information on them. So for the time being, I’ve set up a check in Categorizr to recognize user agents that make it through the tablet detection, but have Prism or Links in the user agent as mobile rather then desktop.

The oddest N800 is the last one, from Midori. It seems the Midori web browser can be used on desktops as-well as mobiles. So setting up a check to recognize user agents with Midori as mobile would create false positives for desktop users that are using Midori.

Now these are small edge cases in my opinion, and are why I consider it important to add a link on your site to allow the user to choose their view. If a user is on a mobile device and is incorrectly categorized as a desktop or vice-versa, it helps increase the user experience tremendously to allow them to correct this false categorization, by allowing them the option to decide which version of the site they want to view.

Issues with search engine bots, spiders, and crawlers.

One issue I had not thought of originally when working on Categorizr, was how to handle bots, spiders, and crawlers. In going with the mobile first approach when detecting devices, it does help reduce the amount of devices one has to check for. Though there are plenty of bots, spiders, and crawlers that need to be categorized as desktop. Lucklily, most can be caught with a few simple keywords. I’ve added a check in Categorizr that recognizes all major search engine bots, spiders, and crawler user agents as desktops, along with a majority of other miscellaneous bots, spiders and crawlers I’ve collected from useragentstring.com. You can view the results of how Categorizr handles search engine bots, spiders and crawlers. Most all of bots, spiders, and crawlers are recognized as desktop, except for a few miscellaneous ones which are categorized as mobile.

In looking more into the user agents which are not categorized as desktop, most of them are either no longer in use/no longer supported, are content/link scrappers or other non-preferred crawlers, or just not popular enough to merit a check to recognize them as desktop bots, spiders, or crawlers.

If you a developer/user of one of these alternative search engines that are recognized as mobile and feel that your user agent should be grouped with other desktop bots, spiders, and crawlers, let me know. I believe Categorizr handles bots, spiders, and crawlers rather well, though I’m open to feedback on this issue.

Conclusion

To wrap up, there are some user agents that are going to be falsely identified.
Without keeping a list of every device user agent, this is inevitable. Even with tools like WURFL and Device Atlas, there are going to be false positives. This is why it’s important to have an option for users to choose their view of the site, be it the mobile version, desktop version, or whichever version you decide.

Categorizr is fairly new and I’m sure there may be more false positives that come up as this technique is used more and more. Though I feel confident in the results I’ve seen in testing Categorizr so far. If you run into any other issues with Categorizr or come across a user agent that you feel is categorized incorrectly, please let me now in the comments below.