【发布时间】:2015-01-16 16:31:44
【问题描述】:
我的 JEE6/JSF/primefaces 应用程序可通过 https 访问(双向 ssl:需要服务器和用户证书)。我希望浏览器缓存资源文件,所以所有 资源带有标头:“Cache-Control:public, max-age=2592000”和“Expires:Fri, 19 Dec 2014 07:46:27 GMT”(现在 + 1 个月)。但是,最近的 FF 和 IE 请求 每个页面上和每次刷新 (F5) 后的所有 js/css/png 文件。以下是我的请求和响应标头。我做错了什么?
Request: GET /javax.faces.resource/primefaces.css.jsf?ln=primefaces HTTP/1.1
Accept: text/css, */*
Referer: https://xxxxx.yy/zz/abc.jsf?type=1
Accept-Language: en-US
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Accept-Encoding: gzip, deflate
Host: xxxxx.yy
DNT: 1
Connection: Keep-Alive
Cookie: ServerID=1845; JSESSIONID=Wmsmxxx!-1754822933
Response: HTTP/1.1 200 OK
Date: Wed, 19 Nov 2014 07:37:49 GMT
Server: Apache
Cache-Control: public, max-age=2592000
Pragma: public
Expires: Fri, 19 Dec 2014 07:46:27 GMT
Last-Modified: Tue, 13 Nov 2012 10:02:34 GMT
X-Powered-By: Servlet/3.0 JSP/2.2
X-Powered-By: JSF/2.0
Keep-Alive: timeout=15, max=100
Content-Language: en
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/css
【问题讨论】:
标签: java http jsf caching header