Re: [Zope] really really refresh?
Hi Robin, you wrote:
Pressed refresh, but still saw the odd image. Suspected caching in zope so restarted zope hit refresh, but still odd. Finally shut down Netscape and the image got changed.
So the problem was with the caching in the browser. ***Food for thought that others may comment on. Is there a way for the image or html files served by zope to serve them with a new date/time every time served rather than their "file date". Can the current system time and date be used? If so, then the browser would be fooled into thinking that the image or html is new? -Bob OConnor bob@rocnet.com ----- Original Message ----- From: Robin Becker <robin@jessikat.demon.co.uk> To: <zope@zope.org> Sent: Saturday, June 19, 1999 9:19 AM Subject: [Zope] really really refresh?
I'm playing with zope2 and after using cvs I saw that the control_panel icon looked a bit odd so I copied the version from the a2 release. ... > Robin Becker
On Sat, 19 Jun 1999 10:59:19 -0400, "Robert O'Connor" <bob@rocnet.com> said: Robert> ***Food for thought that others may comment on. Is there a way Robert> for the image or html files served by zope to serve them with a Robert> new date/time every time served rather than their "file date". Robert> Can the current system time and date be used? If so, then the Robert> browser would be fooled into thinking that the image or html is Robert> new? You can use the http Expires header to force the browser to not cache Expires: 0 Pragma: no-cache I think this combination works pretty well for that. Alex Rice | alrice@swcp.com | http://www.swcp.com/~alrice Current Location: N. Rio Grande Bioregion, Southwestern USA
Alex Rice <alrice@swcp.com> wrote:
"Robert O'Connor" <bob@rocnet.com> said: Robert> ***Food for thought that others may comment on. Is there a way Robert> for the image or html files served by zope to serve them with a Robert> new date/time every time served rather than their "file date". Robert> Can the current system time and date be used? If so, then the Robert> browser would be fooled into thinking that the image or html is Robert> new?
You can use the http Expires header to force the browser to not cache Expires: 0 Pragma: no-cache I think this combination works pretty well for that.
Ok, how do I use this with zope "objects" and does acquisition work so that the current folder and all sub-folders/objects use the http Expires header? -Bob OConnor bob@rocnet.com
On Sun, 20 Jun 1999 09:33:42 -0400, "Robert O'Connor" <bob@rocnet.com> said: Robert> Ok, how do I use this with zope "objects" and does acquisition Robert> work so that the current folder and all sub-folders/objects use Robert> the http Expires header? Sure, you can override your standard_html_header to something like this: <!--# call "RESPONSE.setHeader( 'Expires', '0')"--> <!--# call "RESPONSE.setHeader( 'Pragma', 'no-cache')"--> <html> <head> <title><!--#var title--></title> </head> RESPONSE is described on p.13 of the DTML User's Guide. Alex Rice | alrice@swcp.com | http://www.swcp.com/~alrice Current Location: N. Rio Grande Bioregion, Southwestern USA
participants (2)
-
Alex Rice -
Robert O'Connor