Monday, 16 August 2010

The official way to bypass data modification on O2 mobile networks

Last week I received details from O2 of the official way of bypassing the 'optimisation platform' that O2 use on their mobile networks. They were particularly concerned that I pass on the following comment on the use of this and so I include it below verbatim:

when using this “bypass” function you must consider page impressions will take longer, on average, and thereby detract from the user experience, a slower experience. Also, a greater volume of data will be downloaded , on average, and those customers who do not have unlimited data will use their data bundle faster or incur high bills.

They then then went on to reference section 14.9.5 of the W3C HTTP 1.1 Protocol specification: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.5 which refers to the use of the HTTP Header "Cache-Control: no-transform" response directive. By setting up your server to return this response header, O2 indicate that they will not modify the data.

I should add that I haven't had a chance to test this yet and in particular, to test whether this stops the compression of images as well as the modification of HTTP source code.

Whilst this appears to offer a way for web developers to prevent their site content from being modified, it does not resolve issues for developers of web applications which utilise web data feeds that are not under their own control. For example, the developer of the great iPad Viewfinder app which provides Flickr photo search and download cannot prevent O2 reducing the quality of the images when using it over their mobile network.

5 comments:

twocups said...

This fix DOES seem to work as intended.

Its worth noting that images are also skipped using this method. So you may want to add the header only to the html files (unless you want your images unmodified of course - though bear in mind the bandwidth issue)

For those using apache you simply need to add something like this:

< files ~ "\.(html|php|your_file_extension_here)$" >
Header add Cache-Control "no-transform"
</file >

This solves our problem where we send the files as application/xhtml+xml and the proxy's rewrite breaks the syntax and thus breaks the website.

Quite how O2 think that pushing all the javascript libraries inline is a good idea is beyond me.

Thanks Stuart for chasing this one up with O2

James

Stuart Roebuck said...

James, Many thanks both for confirming and adding a bit of practical explanation of how you did it.

Stuart

Anonymous said...

This fix works great.

Simply add the header to IIS and the page is rendered as it was originally intended.

Thanks Stuart.

Stephen said...

My pages are sending the Cache-Control: no-transform header but O2 are still messing them up. I guess I'll have to change it to send files as text/html instead of application/xhtml+xml when the client is mobile Safari. :(

Reiner Saddey said...

Re: For example, the developer of the great iPad Viewfinder app which provides Flickr photo search and download cannot prevent O2 reducing the quality of the images when using it over their mobile network.

You might try to send the Cache-Control: no-transform from the client, provided your app is both capable and allowed to provide http headers at all.

Try for yourself using Change HTTP Request Header for Chrome.

 
Google Analytics Alternative