想要强制让浏览器不缓存,在meta标签里写上了
<meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Cache-Control" content="no-cache"> <meta http-equiv="Expires" content="0">
但是在地址栏回车的时候,chrome的f12里,css/js/img仍然是Status Code:200 OK (from cache)
Response Header:
Response Header(9) Accept-Ranges:bytes Content-Encoding:gzip Content-Length:32784 Content-Type:application/x-javascript Date:Mon, 31 Oct 2016 06:44:52 GMT ETag:"19ba10a-169d7-52f3ac60e7c40"-gzip Last-Modified:Wed, 30 Mar 2016 02:19:21 GMT Server:Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8e-fips-rhel5 DAV/2 SVN/1.3.2 PHP/5.2.6 Vary:Accept优艾设计网_平面设计-Encoding,User-AgentResponse Header Provisional headers are shown Referer:http://xxx.xxx.com/ User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36
直接用F5刷新的时候,js和css不缓存了,但是图片返回status 304
精彩评论