Cloud Four Blog

Technical notes, War stories and anecdotes

Reminder: Mobile Portland Tonight

Tonight’s topic is “Building an iPhone Business: A Look Back to Look Ahead” by Elia Freedman (Infinity Softworks). For more details see the Mobile Portland site at

Hope to see you there!

Mobile Browser Test (One Year Later)

Hey there.

It’s been a year since we first opened our mobile browser concurrency test for people to use, so I thought I’d take a quick moment to thank everyone who has taken the test.  All 6,461 of you.  Yup, that’s how many individual test results we have thus far (and still counting…).  Those tests have yielded 1,572 unique user agents, of which 638 are unique mobile devices that have completed the test.  Wow.  Thanks everyone.

We’ve learned quite a bit from the data and we hope to see it put to use in some of the mobile device databases, such WURFL and Device Atlas.  While there are quite a few devices that support only one outstanding connection at a time, there are also quite a few newer devices that not only support several concurrent connections, but do so across multiple subdomains.  This is good news for mobile web sites that need to minimize page loading times.  We’ve also verified what we hoped to find – that most devices support http compression, which means there’s no reason not to gzip mobile content for mobile users.

If you would like to take a look at our first year results, trip on over to our test summary page and have a look around.  If you have any questions, please feel free to fire away.

We Have Disabled WP Super Cache

To improve your WordPress performance we have previously advocated using the WP Super Cache plugin to enable pages served from a static cache.  This works quite well unless you are doing some form of content adaptation that is specific for the device accessing your site.  Like you might do for mobile devices.

Some time after enabling the Super Cache plugin we noticed that our blog’s mobile adaptation had stopped working.  Mobile users were seeing the normal web view of blog posts and that was no good.  This was because the cache happened to contain a normal web view.  Interestingly enough, it could also have gone the other way to provide a mobile view of the blog to desktop web browsers.

So, we have turned the plugin off for the time being.  I have some ideas for working around this issue and if I manage to find some time I’ll give them a shot and let you know how it goes.

Mobile Device Detection Results

In a previous post I presented the performance numbers for mobile device detection using WURFL and Device Atlas. Our numbers were generated on a data set consisting of 1,572 unique user agents we collected as part of our mobile device concurrency test.  At the time I was looking for information about the quality of our results – did we have accurate classification of mobile devices for the purposes of our test?  I unintentionally wandered into performance for a while, but now I’m back onto the quality thing.

Here, once again, are the results for processing 1,572 unique user agents:

Method Time (seconds) Mobile Non-Mobile
WURFL Old API 1082 711 861
WURFL New API 20.8 1090 482
Device Atlas 1.2 527 1045
Mobile Device Detect 1.3 684 888

As you can see, there are obviously some differences between results for each detection method. Interestingly, both the old and new WURFL API use the same device database (wurfl.xml file), but yield considerably different results. So, what’s going on here? Is there a clear quality winner in the group?

For the time being, we are using the old WURFL API as our classifier. The new WURFL API is giving us a lot of false positives – many different user agents are mapping to the wireless device “amoi_e72_ver1,” which could be some kind of fall-through condition. It’s possible that I’m doing something wrong, but the API usage is pretty simple: instantiate a class and call a method with the user agent as a parameter.

Device Atlas is interesting to me and it’s quite possible we’ll be shifting to that for device detection. It’s certainly much faster than WURFL in our environment. While there are a few misses, there is really just one issue I’m seeing, and that may not be a real issue at all. The Opera Mini user agents are not being classified as mobile. Is this because we’re talking to a transcoder? Or is it a mistaken classification? I’m not sure, but the other methods all classify these user agents as mobile devices. Take this user agent for example. Should this be classified as a mobile device? Device Atlas says no; WURFL says yes.

Opera/9.50 (J2ME/MIDP; Opera Mini/4.0.10406/298; U; de)

The mobile device detection script actually does a pretty good job. Rather than use a comprehensive user agent database, this script looks for specific, known string fragments in the user agent string. That’s also a bit of its undoing though. For example, I’m seeing a bunch of false positives for user agents containing the word “Java.” I think these false positives could be eliminated by also checking the HTTP_ACCEPT header for mobile content types.


So the implication here is that you need to be aware that device detection is not guaranteed to be 100% accurate. User agent strings are highly variable and non-standardized, so there’s a bit of artistry here.


Comparative Speed of WURFL and Device Atlas

This has probably been done to death elsewhere, but since I’ve been playing around with WURFL and Device Atlas for mobile device detection, I thought I’d publish some comparative performance numbers.

As part of our mobile browser concurrency test we needed to identify test results for mobile vs. non-mobile devices (we get a lot of traditional browsers using our “mobile” concurrency test!).  Because we did this as a post-processing step, we had a fair number of unique user agents – 1,572 – to classify.  We decided to use WURFL to identify mobile devices, but then also decided to perform that same classification via Device Atlas to see if we got similar results (more on that in a later post).  Not content to stop there, we decided to try both the old and new versions of WURFL, Device Atlas, plus a handy PHP mobile detection script

Here are the results for processing 1,572 unique user agents:

Method Time (seconds) Mobile Found Non-Mobile Found
WURFL Old API 1082 711 861
WURFL New API 20.8 1090 482
Device Atlas 1.2 527 1045
Mobile Device Detect 1.3 684 888

As you can see, performance and result quality vary significantly between the different methods. Well, it’s tough to see the result quality here, but the difference between various results says that correctness is an issue. The speed differences are tremendous though. 1,080 seconds is a long time to wait for results; 1.2 seconds on the other hand is quite pleasurable. Now in all fairness, we didn’t do much to optimize the server performance, so it’s possible that WURFL will benefit from an in-memory caching strategy. Perhaps we’ll see.

In my next post I’ll talk about how the results differ and the implications for relying on mobile device detection in your server code.