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: How do you set cache-control for static (gif, jpg) resources
Date Fri, 30 Jul 2004 12:58:23 GMT

Hi,
Tomcat doesn't set any caching headers by itself.  To do so, you can
write a simple filter (examples of this filter are freely available on
the net, it's about 10 LOC) that looks at the response content-type and
adds headers as needed.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Keith Bottner [mailto:kbottner@comcast.net]
>Sent: Friday, July 30, 2004 8:53 AM
>To: tomcat-user@jakarta.apache.org
>Subject: How do you set cache-control for static (gif, jpg) resources
>
>I am trying to find out how I can set my static content for images,
>javascript and css to have a different cache-control setting. It
appears
>that Tomcat always returns Cache-Control: no-cache with every response.
I
>want to specify certain static resources such as gif and jpg to have
>Cache-Control: public,max-age=7200.
>
>Does anyone know how to configure Tomcat to do this? I have Googled
>everywhere with no luck!
>
>Keith



This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message