[Zope] Bug or my fault?

Martijn Pieters mj@antraciet.nl
Mon, 10 May 1999 10:34:48 +0200


At 20:31 08/05/99 , Tom Deprez wrote:
>Another strange? behavior :
>
>If I have added a DTML document with struct. text. View it -> Go back ->
>change it -> view it again, the text shown is the old text (even if I
>refresh my page).
>
>BUT!
>
>If change my DTML-document which calls the struct text (see above), like
>this :
>
>assume I've changed page with id fifth :
>
><!--#var "first" fmt="structured-text"-->  (So I change it to view page
>first)
>
>then change it back to
>
><!--#var "fifth" fmt="structured-text"--> (To view page fifth)
>
>Then I do get my correct page (changed page) after refreshing it...
>
>huh??? Why do I've to change one page, to see the changes of another page???

Because your browser asks the server what the last-modified date is of the 
page it requests. Zope will hand back the date the viewing DTML-page has 
been modified, not the date the included structured-text document was 
changed. IE 4.0 then assumes that the version in it's cache is still valid, 
and displays that.

When reloading a page in IE 4.0, hold the CTRL key if you want to override 
the cache. This should ensure IE really getting the latest version. Or you 
could set a 'Pragma: No-cache' header in you documents, which will avoid 
your document being cached at all. Another solution would be setting the 
Last-modified header to the last-modified date of the structured-text 
document, except that Zope then resets the header after the document has 
been rendered!

No-cache header:
<!--#call "RESPONSE.setHeader('Pragma', 'No-Cache')"-->
--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-6254545 Fax: +31-35-6254555
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------