【发布时间】:2019-02-21 13:42:51
【问题描述】:
得到这个响应头(请求一些静态文件,即一些 *.css):
HTTP/1.1 200 OK
Content-Type: text/css
Keep-Alive: timeout=5, max=99
Set-Cookie: merp_session=eec953c0214e1; path=/; expires=Thu, 21-Feb-2019 15:34:06 GMT; HttpOnly
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
Content-Encoding: gzip
Access-Control-Max-Age: 1000
Access-Control-Allow-Headers: x-requested-with, Content-Type, origin, authorization, accept, client-security-token, X-Merp-Session-Id, Access-Control-Allow-Headers, Access-Control-Expose-Headers, Access-Control-Allow-Origin
Expires: Fri, 22 Feb 2019 13:34:06 GMT
Cache-Control: max-age=86400, private
Date: Thu, 21 Feb 2019 13:34:06 GMT
Transfer-Encoding: Identity
Access-Control-Allow-Credentials: true
Connection: Keep-Alive
Vary: Accept-Encoding
Last-Modified: Wed, 06 Feb 2019 11:05:35 GMT
Server: Apache/2.4.29 (Ubuntu)
X-Catalyst: 5.90115
任何其他浏览器都从本地缓存中获取静态文件,但 IE 总是再次从我的服务器请求所有文件。
我应该设置什么样的响应头来强制 IE 本地缓存?
【问题讨论】:
标签: apache internet-explorer caching http-headers