Accept-Ranges:bytes
Cache-Control:max-age=0, no-cache, no-store, must-revalidate
Connection:Keep-Alive
Content-Length:425169
Content-Type:application/javascript
Date:Thu, 09 Mar 2017 20:06:53 GMT
Expires:Wed, 11 Jan 1984 05:00:00 GMT
Keep-Alive:timeout=5, max=100
Last-Modified:Thu, 09 Mar 2017 20:06:49 GMT
Pragma:no-cache
Server:Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/5.4.16
我在Apache的设置:
Allow from all
AllowOverride All
Order allow,deny
DocumentRoot /webapps/apps/devsite
ServerName testing.devsite.com
SSLEngine off
我的.htaccess:
FileETag None
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
下加载一个新的,非缓存的版本:
在服务器上运行:rm -f /webapps/apps/devsite/scripts/script.js
刷新的网页浏览器(从而得到一个404)
将文件复制回服务器的浏览器
刷新
下做负载旧的CACHED版本:
关于se rver运行:rm -f /webapps/apps/devsite/scripts/script.js
将文件复制回服务器(注:我没在浏览器里刷新还)
刷新浏览器
这表明,Apache是莫名其妙缓存它,直到它得到一个新的请求,并找不到它。为什么?我该如何解决?