tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Turning off caching in Tomcat 4?
Date Thu, 16 May 2002 13:10:34 GMT
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

>-----Original Message-----
>From: []
>Sent: Wednesday, May 15, 2002 8:50 PM
>Subject: Turning off caching in Tomcat 4?
>Tomcat-user list,
>I using Tomcat 4.0 to serve some pages that frequently change.  (They
>modified by software.)  I am seeing cases where Tomcat serves the OLD
>version of the page seconds and sometimes minutes after a modification
>been made.  This does not appear to be a problem with file system
>as I can see the new version of the file in text editors and even
>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-
>For additional commands, e-mail: <mailto:tomcat-user-

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message