cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: [C1,C2][feature request][response.setHeader["Expires","Thu, 01 Dec 1994 16:00:00 GMT");
Date Thu, 25 Jan 2001 09:05:22 GMT
Donald Ball wrote:
> On Wed, 24 Jan 2001, Tagunov Anthony wrote:
> > Hello, Cocooners!
> >
> > You all look so bussy, but I still would like to try to submit an idea of
> > a feature that we and maybe lots of other people need badly.
> >
> > The thing is we have a section
> >
> >
> > <xsp:logic>
> > 		response.setHeader("Pragma","no-cache");
> > 		response.setHeader("Cache-Control","no-cache");
> > 		response.setHeader("Expires","Thu, 01 Dec 1994 16:00:00 GMT");
> > </xsp:logic>
> >
> > in half of our xsp pages. (The variety of options there is to make sure
> > that as many browsers as possible won't cache our page.)
> >
> > Maybe some facility for doing this should be provided somewhere?
> > C1: In the request taglib? In some processor (if we do not want xsp)
>
> i would suggest the response logicsheet. i would also write your own
> logicsheet to automatically apply this template when this element occurs:
>
> <mynamespace:no-cache/>
>
> or something like that.
>
> > C2: haven't had a close look at it sorry, but I'm sure there might be
> > some appropriate place for this feature for preventing browser-side
> > caching.

An other approach is to extend the generators to be 
configurable/parametrizable with headers

  <map:generator name="no-cache-file" src="FileGenerator">
    <header name="pragma" value="no-cache"/>
    <header name="cache-control" value="no-cache"/>
    <expires>+10000</expires>
  </map:generator>

  <map:generator name="semi-cache-file" src="FileGenerator">
    <header name="pragma" value="no-cache"/>
    <header name="cache-control" value="no-cache"/>
    <expires>+100</expires>
  </map:generator>

  <map:generator name="normal-file" src="FileGenerator">
  </map:generator>

Giacomo

>
> - donald
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

Mime
View raw message