[Zope] Prevent cache from being loaded in Zope/DTML
sam gendler
sgendler@akamai.com
Wed, 21 Mar 2001 00:25:25 -0800
--------------C02B117DC4C9513D289AFE9E
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Mohan Baro wrote:
> 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.
Depending on the bowser, you can't. The back button will frequently redraw
what used to be there, regardless of its cachability. The only thing you
really have control over is the reload button. If it is cacheable, reload
might get it out of cache. If it is not, reload is guaranteed to go to the
origin server (usually ;-( )
--sam
>
>
> 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 )
>
> _______________________________________________
> 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 )
--
----------------------------------------------------
"Some Scientists claim that hydrogen, because it is
so plentiful, is the basic building block of the
universe. I dispute that. I say there is more
stupidity than hydrogen, and that is the basic
building block of the universe.
--Frank Zappa
--------------C02B117DC4C9513D289AFE9E
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Mohan Baro wrote:
<blockquote TYPE=CITE>Maybe I am asking the wrong question.
<p>How do I get Zope to reload a page from the server when the user hits
the
<br>BACK button of the browser.</blockquote>
Depending on the bowser, you can't. The back button will frequently
redraw what used to be there, regardless of its cachability. The
only thing you really have control over is the reload button. If
it is cacheable, reload might get it out of cache. If it is not,
reload is guaranteed to go to the origin server (usually ;-( )
<p>--sam
<br>
<br>
<blockquote TYPE=CITE>
<p>I tried
<p><dtml-call expr="RESPONSE.setHeader('Expires', 'Tue, 1 Jan 1980 12:00:00
<br>GMT')">
<p>and
<p><dtml-call expr="RESPONSE.setHeader('pragma', 'no-cache')">
<br><dtml-call expr="RESPONSE.setHeader('expires', '0')">
<p>They are not working.
<p>Mohan.
<p>-----Original Message-----
<br>From: zope-admin@zope.org [<a href="mailto:zope-admin@zope.org">mailto:zope-admin@zope.org</a>]On
Behalf Of Shane
<br>Hathaway
<br>Sent: Tuesday, March 20, 2001 11:22 AM
<br>To: zope@zope.org
<br>Subject: Re: [Zope] Prevent cache from being loaded in Zope/DTML
<p>Mohan Baro wrote:
<br>>
<br>> Hi All,
<br>>
<br>> How do I prevent a page from being loaded from the cache.
<br>>
<br>> I want the following eqiv. in zope/dtml
<br>> <% Response.Expires = 0 %> 'prevent
cache from being loaded
<p><dtml-call expr="RESPONSE.setHeader('Expires', 'Tue, 1 Jan 1980 12:00:00
<br>GMT')">
<p>There might be a simpler syntax but I know this works everywhere.
(The
<br>header name might be "Expiration", though.)
<p>Shane
<p>_______________________________________________
<br>Zope maillist - Zope@zope.org
<br><a href="http://lists.zope.org/mailman/listinfo/zope">http://lists.zope.org/mailman/listinfo/zope</a>
<br>** No cross posts or HTML encoding! **
<br>(Related lists -
<br> <a href="http://lists.zope.org/mailman/listinfo/zope-announce">http://lists.zope.org/mailman/listinfo/zope-announce</a>
<br> <a href="http://lists.zope.org/mailman/listinfo/zope-dev">http://lists.zope.org/mailman/listinfo/zope-dev</a>
)
<p>_______________________________________________
<br>Zope maillist - Zope@zope.org
<br><a href="http://lists.zope.org/mailman/listinfo/zope">http://lists.zope.org/mailman/listinfo/zope</a>
<br>** No cross posts or HTML encoding! **
<br>(Related lists -
<br> <a href="http://lists.zope.org/mailman/listinfo/zope-announce">http://lists.zope.org/mailman/listinfo/zope-announce</a>
<br> <a href="http://lists.zope.org/mailman/listinfo/zope-dev">http://lists.zope.org/mailman/listinfo/zope-dev</a>
)</blockquote>
<pre>--
----------------------------------------------------
"Some Scientists claim that hydrogen, because it is
so plentiful, is the basic building block of the
universe. I dispute that. I say there is more
stupidity than hydrogen, and that is the basic
building block of the universe.
--Frank Zappa</pre>
</html>
--------------C02B117DC4C9513D289AFE9E--