[Zope] disable page cacheing

Sam Gendler sgendler@teknolojix.com
Thu, 02 Dec 1999 17:00:48 -0800


Forget my previous message.  You actually want to use
RESPONSE.appendHeader('Cache-Control', 'no-cache'), since that will apend the
header to the end of a comma delimited list of any previously set Cache-Control
headers.

--sam

Adam Gotheridge wrote:

> I still can't figure it out. The best I can come up with is
> <!--#call "RESPONSE.setStatus('Cache-Control: no-cache')"-->
>
> and that doesn't work
>
> ----- Original Message -----
> From: Sam Gendler <sgendler@teknolojix.com>
> To: Adam Gotheridge <adam@foxvalley.net>
> Cc: zope <zope@zope.org>
> Sent: Thursday, December 02, 1999 5:05 PM
> Subject: Re: [Zope] disable page cacheing
>
> > Adam Gotheridge wrote:
> >
> > > How do stop a page from being cached in either the browser or with Zope?
> I
> > > have added a meta tag like
> > > <META http-equiv="EXPIRES" CONTENT="31 Dec 99">, but it doesn't do
> anything
> > > so I think the page is being cached from zope somehow.
> > >
> > > Thanks
> > >
> > > _______________________________________________
> > > 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 )
> >
> > PLEASEdon't use META tags to provide HTTP functionality.  All web caches,
> and
> > most web servers ignore meta tags, since they deal exculsively with the
> http
> > protocol, and your meta tags are contained in the html.  Instead, set a
> > Cache-Control: no-cache tag in the Response.  See the dtml guide for
> syntax.
> > For future reference, here are useful caching headers in http
> >
> > Cache-Control: no-cache makes an object uncachable
> > Cache-Control: max-age=30 causes a client to cache the object for, at
> most, 30
> > seconds.
> > Cache-Control: s-maxage: only applies to public cache, not private
> (browser)
> > caches.
> > Cache-Control: private means a private cache (such as your browser cache)
> can
> > cache it, but public caches like the ones on your ISP's network, cannot
> cache
> > it.
> > Cache-Control: no-store means don't store the object, same as
> Cache-Control:
> > no-cache
> > Cache-Control: no-cache=Connection means don't store the connection header
> > Cache-Control: must-revalidate means that all caches must validate their
> stored
> > object with the origin server, usually with an If-Modified-Since request
> > Cache-Control: proxy-revalidate is the same as must-revalidate, but it
> doesn't
> > apply to private caches (browser caches)
> > Cache-Control: public makes an object cacheable, regardless of other
> headers
> > that might imply that it is not cacheable.
> >
> > Any of these headers can be combined into a comma delimited list, such as
> > Cache-Control: max-age=100, s-maxage=30, proxy-revalidate
> >
> > If you want to be backwards compatible with really old browsers, you
> should
> > throw a Pragma: no-cache header in there, as well.  Any new browsers will
> give
> > Cache-Control headers preference over Pragma headers, and old browsers
> will not
> > cache the object.
> >
> > The only other header that is object expiration secific is the Expires
> header,
> > which requires a date in a legal HTTP format.  This means rfc822 or
> rfc1123, and
> > rfc1123 is preferred.  It has the format 'Wed, 01 Dec 1999 13:42:23 GMT',
> so
> > Expires: Wed, 01 Dec 1999 13:42:23 GMT is the full form.  Alternatively,
> > Expires: 0 can be used to specify an uncacheable object, according to the
> spec,
> > but I have no idea whether browsers support that in a Meta tag or not.
> >
> > --sam
> >
> >
>
> _______________________________________________
> 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 )