Fixing refresh problems
What seems evident is that newer browsers such as IE 5.0 do not heed Pragma and Expires headers correctly. The solution is to provide the Cache-Control header, which supersedes the "Pragma: no-cache" header in HTTP 1.1, thus: Cache-Control: no-cache The header permits other settings such as max-age (a variation of expiry). See the HTTP 1.1 spec for more information. The header can be emitted through a DTML Method in two ways: 1) Doing this: <!--#call "RESPONSE.setHeader('Cache-Control', 'no-cache')"--> 2) Putting this inside the HTML <head> block: <meta http-equiv="Cache-Control" contents="no-cache"> This works with ZServer 1.11.0pr1 on NT. What bugs me is that ZServer doesn't handle If-Modified-Since correctly, or doesn't seem to. Telnetting to ZServer and typing a future date value doesn't elicit the expected 304 error ("Not modified"). Also, for me, ZServer returns a Last-Modified timestamp that is an hour off. The DateTime module seems to be slightly brain damaged in its handling of time zones; if a document was modified at 18:00 GMT+1 (which is my time zone), ZServer will emit: Last-Modified: Mon, 21 Jun 1999 16:00:00 GMT I've never been a wizard with date arithmetic, but this looks weird to me: When my local time is 18:00, this is 17:00 GMT time. Is this perhaps related to the timezone bug that Dylan Jay posted a fix for a while back? -- Alexander Staubo http://www.mop.no/~alex/ "It has taken the planet Earth 4.5 billion years to discover it is 4.5 billion years old." --George Wald
In article <B059671903C6D211A0D500C0F0301C7910C8EA@kubrick.mop.no>, Alexander Staubo <alex@mop.no> writes
1) Doing this:
<!--#call "RESPONSE.setHeader('Cache-Control', 'no-cache')"-->
2) Putting this inside the HTML <head> block:
<meta http-equiv="Cache-Control" contents="no-cache">
This works with ZServer 1.11.0pr1 on NT.
Using setHeader works for me, but the meta tag does not on 1.11.0pr1 with NT, and Zserver. Since I've never come across this problem before with other web servers, I guess that are correct when you say that Zope/Zserver is not sending sufficient header information to the browser to correctly decide upon caching. At least I can now stop adding random numnbers to my urls! ------- Regards, Graham Chiu gchiu<at>compkarori.co.nz
participants (2)
-
Alexander Staubo -
Graham Chiu