Google’s GWT

Transcoding is a hot topic these days in the mobile community. Google’s GWT has come up a couple of times in some conversations I had in the last 2-3 weeks. I never wondered how they decide to transcode or not, anyway.
I gave it a shot today using cURL and an emulator to get access to some devices quickly.

How I did it
I got on http://www.google.com/m and searched for “WURFL test”; I left the default “Web” setting. As expected my http://t.wurfl.com was the first link. I clicked on it and got to the page, the layout was unchanged, but that’s not a surprise, it’s so simple. Scrolling down I noticed that the user-agent string is not my phone’s, but an ugly generic MSIE user-agent string. Scrolling down a bit more I noticed the standard chrome provided by GWT that lets you disable images or request the page in the original source.

The solution
I sent an e-mail to Sean Owen, who is in the W3C MWI with me. Surprisingly he replied on a Sunday and was very helpful. He explained me how their crawler is able to mark mobile sites and make sure the GWT will not transcode anything. The problem is that at the moment this magic feature is available in the US only and will be rolled out to the world soon. Since I left “Web” in my search I got the web version of my site (t.wurfl.com has a very basic device detection that provides different markup based on the Accept headers). US users should already get the mobile version of t.wurfl.com. Anyway, Sean also suggested a trick that now provides the mobile version to all mobile users without any other update required. I added the following tag in the head of the page:
<link rel=”alternate” media=”handheld” href=”http://t.wurfl.com/index.php”>

Seconds after the update I requested again the page with the emulator and got the mobile version.

PS: if you want to get a mobile page using cURL you can do this:
curl -D – -A “Nokia6600” “http://www.google.com/gwt/n?u=t.wurfl.com/”

You will see the page source and the HTTP headers sent by the server. Read the manual for more commands, cURL is super-powerful!