I'm using a technique similar to Rick Strahls example, but have notcied using google's speed tracer that
Resource Caching : @10.88s - The following resources specify a "Vary" header that disables caching in most versions of Internet Explorer. Fix or remove the "Vary" header for the following resources: ...
The question is Which versions of internet explorer? If I include a way of only outputting Vary for all browsers except early version of internet explorer, will this get resolved?
If AllowsCacheingOnVaryHeader() Then
Response.AppendHeader("Vary", "Content-Encoding")
Response.AppendHeader("Vary", "Accept-Encoding")
End If
In the function "AllowsCacheingOnVaryHeader()" - what exactly should I be checking for? All version of IE prior to 7, 8 or 9?
See EricLaw's for the background on this.
Response.AppendHeader("Vary", "Accept-Encoding")
Should be OK. An up-to-date IE6 should ignore Vary: Accept-Encoding
. I believe older IE6 SPs didn't.
Response.AppendHeader("Vary", "Content-Encoding")
I'm not sure what that's for. Content-Encoding
is a response header not (typically) a request header so how can you Vary
on it? It will certainly trip IE up, can you simply remove that and be done with it?
To answer the question: no, IE7 is still just as broken as IE6 re Vary
, as it's using the same underlying wininet code. I haven't tried it but I expect IE8 is the same. IE7 does behave less badly when an ETag is supplied (it revalidates the resource instead of fully refetching it), but the basic bug is unaltered.