由於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,搞定!