You are here: Caching (was Re: Which browser to write for??) « HTML « IT news, forums, messages
Caching (was Re: Which browser to write for??)

Posted by Michael Winter on 04/25/06 19:00

On 25/04/2006 08:20, Toby Inkster wrote:

[snip]

> * IE's caching mechanism can sometimes be a little off-
> kilter: sometimes it will continue to use an older version
> of a style sheet when a newer one has been uploaded -- this
> can make testing a pain.

True, but as far as I can see (I've been checking with
dynamically-generated images), this only occurs when no freshness
information (Expires header or Cache-Control: max-age directive) is
available, or when a specified lifetime is too long.

In the former case, the behaviour IE exhibits is generally acceptable as
the estimated lifetime should suffice in the majority of cases on the
Web. For the latter case, one can hardly blame IE for an incorrectly
specified lifetime, however undesirable the consequences. Still, doesn't
Ctrl+F5 (forced refresh) also reload style sheets?


Unfortunately, I don't know how IE makes its lifetime estimate; the
cache lists 'None' rather than the date and time that IE intends to use.
However, it seems clear that if the Last-Modified header is absent, and
as long as IE isn't configured /not/ to reexamine cached entities, IE
will always revalidate a resource.

That said, one must recognise that the caching behaviour isn't entirely
sensible: if the Last-Modified date matches that of the Date header in
the same response, IE still seems keen to reuse it without revalidation.
There also seems to be a minimum lifetime of around two seconds, even
when an explicit zero is given.


Comparing other user agents, it would seem that Op acts similarly to IE,
though without any dependency on the Last-Modified header; the History
preferences will determine when it revalidates a resource that lacks
freshness information. Fx takes a different approach, and always
revalidates whenever the lifetime is unknown (though there an advanced
property, browser.cache.check_doc_frequency, that will that).


Whilst we're (I'm) discussing caching, can I ask for some clarification
(though I'm quite certain of the answer)?

The name of the no-cache Cache-Control directive is misleading in that
it implies that the caching of a response entity should not be permitted
(though no-store is explicit in that regard) and indeed IE and Op both
seem to take that position. However, I agree with Mark Nottingham[1]
that RFC 2616 does permit the caching of such a resource, but requires
end-to-end revalidation before satisfying any subsequent request with
the same entity.

Does anyone care to provide definitive remarks either way, and perhaps
caches (proxy or client) that are known to be problematic? Fx appears to
behave as I would expect as a no-cache resource is listed in the disk
cache (about:cache?device=disk).

Mike


[1] <http://www.mnot.net/cache_docs/#CACHE-CONTROL>

--
Michael Winter
Prefix subject with [News] before replying by e-mail.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация