tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Turning off caching in Tomcat 4?
Date Thu, 16 May 2002 13:10:34 GMT
Hi,
I wonder if it's the browser that is caching things?  We have some
frequently changing pages as well, and found that the browser(s) were
caching them, not tomcat.  

Have you tried playing with the no-cache directives?  E.g. if you're
using a servlet or JSP, add the following headers to the pages that
change frequently:

response.setHeader("Cache-Control", "no-cache"); // HTTP 1.1
response.setHeader("Pragma", "no-cache"); // HTTP 1.0
response.setDateHeader("Expires", 0); // Proxy caches

Yoav Shapira
ChemInformatics


>-----Original Message-----
>From: Eric.Bier@parc.com [mailto:Eric.Bier@parc.com]
>Sent: Wednesday, May 15, 2002 8:50 PM
>To: tomcat-user@jakarta.apache.org
>Cc: Eric.Bier@parc.com; Ken.Pier@parc.com
>Subject: Turning off caching in Tomcat 4?
>
>Tomcat-user list,
>
>I using Tomcat 4.0 to serve some pages that frequently change.  (They
are
>modified by software.)  I am seeing cases where Tomcat serves the OLD
>version of the page seconds and sometimes minutes after a modification
has
>been made.  This does not appear to be a problem with file system
caches,
>as I can see the new version of the file in text editors and even
different
>Web servers while Tomcat is still serving up the old version.
>
>So, I am wondering.  Does tomcat cache recently requested pages?  If
so, is
>there a way to turn this caching off?
>
>	-- Eric
>
>--
>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