Re: [squid-users] Internet Explorer caching problem

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Tue, 31 Jan 2012 10:59:07 +1300

On 31.01.2012 06:32, Andy Nagai wrote:
> We have noticed that the pages which have no-cache response header
> settings
> are being cached in IE 7-8 no matter what settings on the browser is.

"no-cache" does not mean what you seem to think it means.
"no-cache" from a server is *actually* meant to list a set of headers
which are to be erased from the cached object when its delivered as a
HIT later on. For example, Cache-Control: no-cache="Cookie,Via".
When its supplied by the server without any list at all, it is
identical in behaviour to "must-revalidate".

"Pragma: no-cache" has no meaning in responses. It is ignored by most
HTTP software.

"Expires: -1" is invalid, HTTP software treats invalid values as a date
in the past. Caching *is* permitted, but it is also treated as stale
content that need revalidating before re-use. eg, this is equivalent to
"must-revalidate'.

The *only* relevant part of that request you provided which actually
prevents caching is "no-store". Which as its name suggests tells the
proxy not to store the object at all.

Here is a great resource covering what the controls do and when to use
them: http://www.mnot.net/cache_docs/
Marks blog and some other documents add to that with more specific
details on specific cases if you need more info. The HTTPbis working
groups latest Draft RFCs also have some clear explanations of the
various bits.

>
> IE doesn't necessarily not cache if told not to. Apparently IE
> recognizes
> the no-cache meta tags and this should be placed at the end of the
> html in
> another head section according to this article. The meta tag should
> not be
> placed at the very top before 32kb are transmitted. I have tested
> this fix
> and now the pages I don't want cached are not caching in IE.
>
> http://support.microsoft.com/kb/222064/

This is a good example of confusing multi-layered design. Squid and
many other cache intermediaries are based on the HTTP protocol headers
*alone*. The above page is discussing HTML meta data which is completely
separate from the HTTP layer. You cannot depend on page tags meaning
anything to any proxy along the request path.
see http://www.mnot.net/cache_docs/#META for why it does not work.

>
> Also see this
>
>
> http://www.htmlgoodies.com/beyond/reference/article.php/3472881/So-You-Dont-
> Want-To-Cache-Huh.htm
>

Ewww.

Amos
Received on Mon Jan 30 2012 - 21:59:12 MST

This archive was generated by hypermail 2.2.0 : Tue Jan 31 2012 - 12:00:04 MST