X-Device-User-Agent header appearing in requests

One good thing about open standards is that anyone can pick them up and implement them. This means that everyone will benefit from this as the standardization will open new opportunities for everything. If there is one thing that we need in the mobile space, that is standardization. We at dotMobi have worked hard in the last few months, almost a year now, and we are proud to say that the Content Transformation Guidelines are now in Last Call Working Draft, which is one of the steps before reaching the stage of Recommendation. A good news for all the developers working every day on improving their sites and services is that some companies have already picked up some if not all the instructions described in the document. Google is one of these.

Back in January I tested the Google Wireless Transcoder and recorded the HTTP request headers. This is what I saw:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Google Wireless Transcoder;)
Accept-Charset: ISO-8859-1, UTF-8, *;q=0.5
Accept: text/html, application/xhtml+xml, image/png, image/tiff, image/jpeg, image/gif, image/bmp, text/plain, application/pdf;q=0.1, application/zip;q=0.1, application/msword;q=0.1, application/vnd.ms-excel;q=0.1, application/wordperfect, application/x-wordperfect, application/wpwin, application/x-wpwin, */*;q=0.1

A few weeks ago I read about them starting to implement the W3C guidelines on the public mailing list, so I went on and tested. This is what I recorded:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Google Wireless Transcoder;)
Accept-Charset: ISO-8859-1, UTF-8, *;q=0.5
Accept: text/html, application/xhtml+xml, image/png, image/tiff, image/jpeg, image/gif, image/bmp, text/plain, application/pdf;q=0.1, application/zip;q=0.1, application/msword;q=0.1, application/vnd.ms-excel;q=0.1, application/wordperfect, application/x-wordperfect, application/wpwin, application/x-wpwin, */*;q=0.1
X-Original-User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; it-it) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.1 Safari/525.18
X-Device-User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; it-it) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.1 Safari/525.18

I also tested with an iPhone, just in case:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Google Wireless Transcoder;)
Accept-Charset: ISO-8859-1, UTF-8, *;q=0.5
Accept: text/html, application/xhtml+xml, image/png, image/tiff, image/jpeg, image/gif, image/bmp, text/plain, application/pdf;q=0.1, application/zip;q=0.1, application/msword;q=0.1, application/vnd.ms-excel;q=0.1, application/wordperfect, application/x-wordperfect, application/wpwin, application/x-wpwin, */*;q=0.1
X-Original-User-Agent: Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/4A93 Safari/419.3
X-Device-User-Agent: Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/4A93 Safari/419.3"

As you can see two extra headers now appear, the X-Original-User-Agent and the X-Device-User-Agent. At some point, in the W3C, they were wondering about different names, it looks like Google went pragmatic and implemented both. This is nothing but good news. This should make the developers’ life easier.

As expected, providing the appropriate headers will make GWT automatically get out of the way and let the user agent make the request on its own.

There are still a few quirks, though. The proxy is not providing the Via and they are modifying the original request headers such as Accept without providing the original ones as X-Device-Accept, for example.

Caveat: although the W3C CTG say that you should use the original request headers including the User-Agent string, I think this is a different case because I went to the GWT homepage and specifically requested to get a transcoded page. I have not tested what happens if you go to a page via GWT from a search, for example.

How I tested

  • Visit Google Wireless Transcoder with a mobile device.
  • Type http://logme.mobi in the text field and visit the page.
  • Go to the query page of logme.mobi to see who visited the site, http://logme.mobi/query/index.php
  • Search for GWT’s user-agent string, Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Google Wireless Transcoder;)

Exclusive tips, how-tos, news and comment

Receive monthly updates on the world of mobile dev.

Other Products

Market leading device intelligence for the web, app and MNO ecosystems
DeviceAtlas - Device Intelligence

Real-time identification of fraudulent and misrepresented traffic
DeviceAssure - Device Verification

A free tool for developers, designers and marketers to test website performance
mobiReady - Evaluate your websites’ mobile readiness

© 2024 DeviceAtlas Limited. All rights reserved.

This is a website of DeviceAtlas Limited, a private company limited by shares, incorporated and registered in the Republic of Ireland with registered number 398040 and registered office at 6th Floor, 2 Grand Canal Square, Dublin 2, Ireland