tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter lin <peter....@labs.gte.com>
Subject Re: no-cache where to set?
Date Thu, 01 Aug 2002 11:22:06 GMT

In your jsp page, add the following code at the top.

<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
%>

for more info on no-cache, jguru has some useful stuff

http://www.jguru.com/faq/view.jsp?EID=377


peter


slickdev wrote:
> 
> pardon my naivete', but where do i set pages for 'no-cache'?  i hope it's
> not just a browser setting... unknown number of browsers to set.
> 
> ----- Original Message -----
> From: "peter lin" <peter.lin@labs.gte.com>
> To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> Sent: Friday, July 26, 2002 1:31 PM
> Subject: Re: Can Tomcat 4.03 expire web pages
> 
> >
> > set your pages to no-cache, which forces the browser to always get it
> > from the server. Is that what you're looking for?
> >
> > peter
> >
> >
> > Steve Russell wrote:
> > >
> > > Hi;
> > >
> > > My boss wants to "expire" our jsp pages.
> > >
> > > In other words, if a user hits backspace, instead of getting the jsp
> > > page s/he just left s/he would see a notice that the page expired.
> > >
> > > I've seen snippets of code to do this on google, but I haven't been able
> > > to get them to work.
> > >
> > > Can Tomcat 4.03 "expire" web pages or do I need a webserver with Tomcat
> > > to do this?
> > >
> > > Also if someone could show me an example of how do this, with the
> > > example of being a whole html/jsp page I would appreciate it.
> > >
> > > Thanks in advance
> > >
> > > Steve
> > >
> > > --
> > > To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
> >
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message