Enable Browser Caching for Tomcat’s Deliveries
Tomcat automatically adds “no-cache” directives to each response. This is not a good idea when you are not using Apache as the serving host for static content. I found a very easy way to get rid of that HTTP header. Just add a new file named “context.xml” to the WEB-INF directory of your application:
1 2 3 4 | <context> <valve className="org.apache.catalina.authenticator.BasicAuthenticator" disableProxyCaching="false" /> </context> |
For finer control, please have a look at Symphonious’ article on that topic.
February 16th, 2009 at 9:23 am
Hi Ralph,
I had been looking for just the solution you have above.
Thanks a Zillion for the post.
It made my task simple.
Regards
Omer