Reputation: 5585
When one of my websites is viewed over a mobile 3G network the network operator o2 in this case is rewriting the page and embedding all the styles in-line, this is causing the page to break. As the styles rules are not followed properly.
Now I understand from the guys at o2 that I can stop this happening by adding a Cache Control heading of "no-transform" to my site.
The problem is that adding this via IIS dosn't seam to do anything. and you cant add the cache control "no-transform" via code in .net as its not one of the system.Web.HttpCacheability options.
Any idea how I can get this header in and stop the page being tampered with by the mobile operator.
Upvotes: 3
Views: 749
Reputation: 13397
Alternatively, you could add a meta element to your HTML, like so:
<meta http-equiv="Cache-Control" content="no-transform" />
Upvotes: 1
Reputation: 37516
You should be able to use the Response.AddHeader method, like this:
Response.AddHeader("cache-control", "no-transform");
Verified this with Firebug, and it looks OK.
Upvotes: 3