tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joost Baaij <>
Subject Client-side caching via If-Modified-Since
Date Wed, 08 Sep 2004 12:33:02 GMT
Hi all, I'm new to the list. Have searched on the web for answers to my
question, but was unable to find much.

Summary: I am trying to utilize client-side caching via
the If-Modified-Since request header and 304 response code for jsp pages.

There is a mechanism in Tomcat that returns status 304 for static files
that have not been modified since the last request by the client. I've
seen it in my logs, but only for gif, jpg, css files and the like.

I run a website with many thousands of articles online. Every time Google
et al come around, my load shoots up since they're requesting all
articles. I added the Last-Modified header to all articles, in the
understanding that Tomcat would match this header with the incoming
If-Modified-Since, and return 304 for old articles.

This does not seem to happen though (Tomcat 4.1.24). Correct?

So then I'm left with writing a filter that does this trick for me.
Unfortunately I'm stuck there too (I've attached it). My question really
is, should this functionality be in Tomcat and if it is, how can I use it?


View raw message