[Zope] Re: Cache-Control not working

Johan Carlsson [Torped] johanc@torped.se
Thu, 23 Aug 2001 10:43:53 +0200


So, I figured it out (it not a bad idea to sleep ones in a while).

I was hiting the refresh button which makes the browser send
a If-Modified-Since request. When I use a link to refresh the
page it behaves correctly. Even for images, which was my
initial target for browser caching.

I have put my work on zope.org, for anyone interested:
http://www.zope.org/Members/johanc/EasySystem/EasyImage/index_html

Regards,
Johan Carlsson



> Hi all,=20
> Has anyone be able to use Cache-Control from Zope?
> I've tried both of the following headers (the later one for IE5.5)
> but I a new DateTime each time.
> Maybe it's just my browsers (IE5.5 and Netscape=AE Communicator 4.75)
>=20
> DTML-Method:
> <dtml-call "RESPONSE.addHeader('Cache-Control','max-age=3D100000')">
> <dtml-call "RESPONSE.addHeader('Cache-Control','post-check=3D100000, =
pre-check=3D50000')">
> <html><body>
> <pre>
> <dtml-var "_.DateTime()">
> </pre>
> </body></html>
>=20
>=20
> Catched output from ZPublisher.Publish.py (publish):
>=20
> HTTP/1.0 200 OK
> Server: Zope/Zope 2.3.3 (binary release, python 1.5.2, win32-x86) =
ZServer/1.1b1
> Date: Wed, 22 Aug 2001 23:06:15 GMT
> Connection: Keep-Alive
> Content-Type: text/html
> Content-Length: 259
> Cache-Control: max-age=3D100000
> Cache-Control: post-check=3D100000, pre-check=3D50000
>=20


<html><body>
<pre>
2001/08/23 01:06:15.01 GMT+2
</pre>

</body></html>

Regards,
Johan Carlsson