Resolution: Cannot Reproduce
Affects Version/s: None
Fix Version/s: None
Glassfish 3.1.2 / JSF 2.1.9 / Windows 7 / Chrome browser
If you try to set http response header like this in a servlet filter doFilter()
response.setHeader("Cache-Control", "max-age=31536000, public, must-revalidate");
only the Cache-Control setting is present in the response header received by the
Regardless of what you set Last-Modified/ETag to somehow it seems to get set to
something very close to the last application deployment time (or maybe the last
clean and build time?), this suggesting that all your bundled resources will get
reloaded at least each time you redeploy.
For example I would only want javax.faces/jsf.js to be reloaded if I'd upgraded
I don't want that getting reloaded as often as every night.
So I either need the Last-Modified/ETag fields to get set to something that relates
to the when the file was actually last modified, or I need to be able to set it to
a value under my own control. At present I have neither option.
At present I'm not using Tomcat but will need to introduce it for cluster load
balancing pretty soon, so if that will solve the problem maybe I need to think
about it sooner rather than later.
I hope I've got this all right, it can get pretty confusing.