Re: [Zope-CMF] Re: IE Cache Bug and CachingPolicyManager
Geoff Davis wrote at 2005-9-28 13:31 -0400: On Wed, 28 Sep 2005 12:47:06 -0400, Tres Seaver wrote: Thanks for the analysis, and the fix (sorry for the earlier, premature reply). No problem. P-J Grizel suggested offline that the problem might be due to IE not parsing the time zone string at the end of the Last-Modified date stamp correctly. HTTP 1.1 specifies: All HTTP date/time stamps MUST be represented in Greenwich Mean Time (GMT), without exception. For the purposes of HTTP, GMT is exactly equal to UTC (Coordinated Universal Time). This is indicated in the first two formats by the inclusion of GMT as the three-letter abbreviation for time zone, and MUST be assumed when reading the asctime format. Thus, there *MUST* not be any time zone different from GMT. -- Dieter ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
[Zope-CMF] Re: IE Cache Bug and CachingPolicyManager
-BEGIN PGP SIGNED MESSAGE- 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. 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. Let's not forget the trunk, either. Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDOsjI+gerLs4ltQ4RAr6AAJ90dcg4uz7BmSkTK/mDrux4K6xaHgCg3BO+ oSJ1WhW0Bw6/1IuRvi4cyK8= =jinn -END PGP SIGNATURE- ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
[Zope-CMF] Re: IE Cache Bug and CachingPolicyManager
-BEGIN PGP SIGNED MESSAGE- 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 reply). 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. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDOskJ+gerLs4ltQ4RAieeAKCvhbFD8SgeppjyqNSHliK/RWgzBACgguTW sP+pH39cbzoxSuH0S7+nAyE= =Zx3z -END PGP SIGNATURE- ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
[Zope-CMF] Re: IE Cache Bug and CachingPolicyManager
On Wed, 28 Sep 2005 12:47:06 -0400, Tres Seaver wrote: Thanks for the analysis, and the fix (sorry for the earlier, premature reply). No problem. P-J Grizel suggested offline that the problem might be due to IE not parsing the time zone string at the end of the Last-Modified date stamp correctly. He's tracking down the information. If he's right, there may be a few places in CMF and possibly Zope that will need a bit of minor surgery. I *think* such a patch should apply cleanly to the trunk as well. Ok. Do you want me to take care of it? Geoff ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests