• 打开httpd.conf

  • 开启扩展

确保开启 LoadModule headers_module modules/mod_headers.so

apache设置无缓存

  • 添加配置项

并添加以下配置,跟据文件类型来让浏览器每次都从服务器读取,这里测试用css、js、swf、php、html、htm这几种文件。

<FilesMatch "\.(css|js|swf|php|htm|html)$">
    Header set Cache-Control "private,no-cache,no-store,proxy-revalidate,no-transform"
    Header set Pragma "no-cache"
</FilesMatch>

 apache设置无缓存

  • 亲测oK

相关文章:

  • 2021-10-23
  • 2021-06-02
  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
  • 2022-03-07
猜你喜欢
  • 2021-10-31
  • 2021-07-05
  • 2021-06-15
  • 2021-10-29
  • 2022-01-25
  • 2021-12-02
相关资源
相似解决方案