> -----Original Message-----
> From: Ovidiu EFTIMIE [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 09, 2004 12:15 AM
> To: Struts Users Mailing List
> Subject: Re: Preventing Page Caching
> 
> 
> I ussualy use this 
> 
> <%
>   response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT");
>   response.setHeader("Cache-Control", "no-store, no-cache, 
> must-revalidate");
>   response.addHeader("Cache-Control", "post-check=0, pre-check=0");
>   response.setHeader("Pragma", "no-cache");
> %>

http://struts.apache.org/userGuide/configuration.html
Specifically:
nocache - Set to true if you want the controller to add HTTP headers for defeating 
caching to every response from this module. [false] (optional)

Much easier.

> 
> 
> On Wed, 8 Sep 2004 15:49:38 -0700, Jim Barrows 
> <[EMAIL PROTECTED]> wrote:
> > 
> > 
> > > -----Original Message-----
> > > From: news [mailto:[EMAIL PROTECTED] Behalf Of 
> Irfandhy Franciscus
> > > Sent: Tuesday, September 07, 2004 8:18 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Preventing Page Caching
> > >
> > >
> > > Hi All,
> > >
> > > I am developing some pages with struts. When I was testing my
> > > pages, I
> > > realize that if I click the back and forward button, my
> > > browser (IE or
> > > Firefox) will load the cached page, instead of retrieving 
> the latest
> > > data from the database.
> > >
> > > Is there anyway to prevent this caching, or is there a way to
> > > tell the
> > > browser to always load the a new page instead of the cache ?
> > 
> > Sarch the archives, all kinds of info.   The manual has it too!
> > 
> > 
> > 
> > 
> > >
> > > Regards,
> > > Irfandhy Franciscus
> > >
> > >
> > > 
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to