apache 浏览器缓存

 

1,apache

浏览器默认是会缓存静态文件的,如发现没有

 

找到<IfModule mime_module>

注释下面代码

#AddType text/html .shtml .html .htm

#AddOutputFilter INCLUDES .shtml .html .htm

 

禁用缓存

打开

LoadModule headers_module modules/mod_headers.so

添加

<IfModule mod_headers.c>

#对index文件禁用缓存

<FilesMatch "index.(html|htm)$">

header unset ETag

header set cache-control "no-store"

</FilesMatch>

</IfModule>

 

 

猜你喜欢

转载自fengjunoo.iteye.com/blog/2366136