想要強(qiáng)制讓瀏覽器不緩存,在meta標(biāo)簽里寫上了
<meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Cache-Control" content="no-cache"> <meta http-equiv="Expires" content="0">
但是在地址欄回車的時(shí)候,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刷新的時(shí)候,js和css不緩存了,但是圖片返回status 304