[Zope-CMF] Re: IE Cache Bug and CachingPolicyManager

Tres Seaver tseaver at palladion.com
Wed Sep 28 12:47:06 EDT 2005

Hash: SHA1

Geoff Davis wrote:
> In testing all the new caching code, I ran into a fairly nasty IE bug:
> IE pays attention (more or less) to the Cache-Control header when it comes
> to requesting new content from the server.  The "more-or-less" part is
> because IE 5.5+ introduces some proprietary Cache-Control tokens,
> pre-check and post-check, that let IE ignore the headers to some extent (see 
> http://msdn.microsoft.com/workshop/author/perf/perftips.asp ).
> Fortunately, this behavior can be turned off by setting Cache-Control:
> pre-check=0, post-check=0 
> The problem is that after the page has been requested, IE doesn't
> necessarily actually render it.  If you have a page with a Last-Modified
> tag, under some (all?) circumstances, IE will render what it has in cache
> rather than what it has just requested.  My guess is that there is a bug
> in IE that causes its internal Last-Modified freshness heuristics to
> override explicit Cache-Control freshness declarations and that it pulls
> the cached page from the wrong place or at the wrong time.  It was
> difficult to track down, but straightforward to work around: I modified
> CMFCore/CachingPolicyManager.py to allow you to disable the Last-Modified
> header.  To preserve backward compatibility, Last-Modified is on by
> default, but you can now explicitly disable it.  I have also added the
> ability to set the pre-check and post-check tokens.

Thanks for the analysis, and the fix (sorry for the earlier, premature

> As an aside, a very useful tool for working with caching and IE is
> Fiddler: http://www.fiddlertool.com/fiddler/
> It's basically the equivalent of LiveHTTPHeaders for IE.
> I am checking the fixes (with tests) into the 1.5 branch, and Sidnei has
> volunteered to backport them to CMF 1.4.

I *think* such a patch should apply cleanly to the trunk as well.

- --
Tres Seaver          +1 202-558-7113          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org


More information about the Zope-CMF mailing list