tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Dai <>
Subject Re: How do you set cache-control for static (gif, jpg) resources
Date Sat, 31 Jul 2004 00:18:07 GMT

This is on one of my development servers. I'm mostly using 
Mozilla/Firefox, which generate those 304 log entries.

For Internet Explorer, it generates those 304s only after I set the 
temporary Internet files to "Every visit to the page" which is not the 
default. It doesn't even make the request for those static contents with 
the default settings which is "Automatically". FYI, I'm using IE6 SP1 on 
Windows 2000 Pro with security patch. Don't know how other versions of 
IE behave though.


On 7/30/2004 3:08 PM, Keith Bottner wrote:

> Dennis,
> May I ask what client specifically is accessing your server? The client can
> actually send an If-Modified-Since field with its request and the 304 would
> be the response if it had not been modified since that specified date/time.
> Some intermediary caches (proxies) use this as a more efficient method of
> caching. And depending on what information was returned with the previous
> get determines what clients may query. Specifically my problem was with
> Internet Explorer, it which case it does not send an If-Modified-Since it
> just requests the resource. Still not crystal clear on all of this but, the
> solution I settled on seems to work.
> Keith
> -----Original Message-----
> From: Dennis Dai [] 
> Sent: Friday, July 30, 2004 3:07 PM
> To: Tomcat Users List
> Subject: Re: How do you set cache-control for static (gif, jpg) resources
> I've been reading this thread back and forth for quite a few times :)
> My observations are tomcat does send response code 304 on static 
> contents (.js, .jpg, .gif, etc.), so I don't know why you said "Tomcat 
> always returns Cache-Control: no-cache with every response" at the very 
> beginning of this thread. Well I haven't done any request dump to see if 
> that's the case, but I do see lots of 304s in my access log (which, I 
> assume, is not quite possible if it sets Cache-Control to no-cache with 
> every response).
> Speaking of cache, there was an onJava article about caching with 
> filter, but that's mostly for caching dynamically generated pages, which 
> may or may not be of interests to you guys:
> Regards,
> Dennis

Dennis Dai

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

View raw message