由于php的缓存机制,更改页面内容后不能马上看到效果。解决方法如下:
在Apache的httpd.conf文件中修改:
去掉对 LoadModule headers_module modules/mod_headers.so 的注释。
然后设置不缓存:
<FilesMatch "\.(php|js|css|swf|html)$">
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</FilesMatch>
重启Apache,搞定!