[Zope] Prevent cache from being loaded in Zope/DTML

Mohan Baro mcbaro@uwimona.edu.jm
Tue, 20 Mar 2001 12:27:27 -0500


Maybe I am asking the wrong question.

How do I get Zope to reload a page from the server when the user hits the
BACK button of the browser.

I tried

<dtml-call expr="RESPONSE.setHeader('Expires', 'Tue, 1 Jan 1980 12:00:00
GMT')">

and

<dtml-call expr="RESPONSE.setHeader('pragma', 'no-cache')">
<dtml-call expr="RESPONSE.setHeader('expires', '0')">


They are not working.



Mohan.





-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Shane
Hathaway
Sent: Tuesday, March 20, 2001 11:22 AM
To: zope@zope.org
Subject: Re: [Zope] Prevent cache from being loaded in Zope/DTML


Mohan Baro wrote:
>
> Hi All,
>
> How do I prevent a page from being loaded from the cache.
>
> I want the following eqiv. in zope/dtml
>      <% Response.Expires = 0 %> 'prevent cache from being loaded

<dtml-call expr="RESPONSE.setHeader('Expires', 'Tue, 1 Jan 1980 12:00:00
GMT')">

There might be a simpler syntax but I know this works everywhere.  (The
header name might be "Expiration", though.)

Shane

_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )