tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Context attribute "cachingAllowed" does not work as expected. Isthis a bug?
Date Mon, 12 Feb 2007 22:40:59 GMT
> From: Stefan [mailto:stefan.riegel@telig.de] 
> Subject: Context attribute "cachingAllowed" does not work as 
> expected. Isthis a bug?
> 
> That means once set to false, that tomcat will not cache any static
> resources like the index.html page regardless which headers the client
> sends. So tomcat should not send the status code 304.

I'm not completely sure about this, but I think you're confusing server
caching with client caching.  If the client requests content with a last
modified timestamp, the server will check if the content has changed
since then and either send the updated content with a 200 or just return
the 304 and let the client use what it already has.  The cachingAllowed
attribute of <Context> only controls whether or not Tomcat's
DefaultServlet keeps a copy in Tomcat's memory of what it reads from the
file system; it does not set the response headers to indicate to the
client that the information should not be cached at the client end.  To
do that, you'll need to use your own filter.

You might want to use Ethereal or any of the browser header monitoring
tools to look at the complete set of headers being used.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message