我只将 index.html 放在/var/www/html 中。
更改 index.html 的内容并重新加载后,页面不会更新。
我已经像下面这样在 httpd.conf 中禁用了 cache_module 。
# LoadModule cache_module modules/mod_cache.so
# LoadModule disk_cache_module modules/mod_disk_cache.so
最佳答案
如果您使用的是 htaccess,那么您可以这样做
#Initialize mod_rewrite
RewriteEngine On
<FilesMatch "\.(html|htm|js|css)$">
FileETag None
<IfModule mod_headers.c>
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, 12 Jan 1980 05:00:00 GMT"
</IfModule>
</FilesMatch>
关于apache - 如何禁用Apache的缓存?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22891965/