开发者

JSF Resource sends 304 not modified afer redeployment

开发者 https://www.devze.com 2022-12-27 14:28 出处:网络
I use outputStylesheet and outputScript for some resources. But when I\'ve made changes to the development project and want to redeploy in the production environment (upload the WAR to Glassfish admi

I use outputStylesheet and outputScript for some resources. But when I've made changes to the development project and want to redeploy in the production environment (upload the WAR to Glassfish admin console) the response code for the resources are 304 (not modif开发者_运维知识库ied) which means that the browser wont pickup the changes before the caches are reset.

Any ideas? I use JSF2 and Glassfish v3


I had the same problem too. Then I tried it on Glassfish 3.1-b25, and it works!


I haven't tried upgrading the version of GlassFish, but if that doesn't work you could try setting the max-age or expires headers to some small value.

Alternatively, you can use touch (only on UNIX) to update the modified date on the static content after a redeploy.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号