页面重新加载会在.htaccess中设置不设置缓存的缓存数据

时间:2018-09-04 08:25:51

标签: cache-control

我阅读了这里所有与该问题相关的问题。 This one and that one非常接近解决方案,但是当用户获取生成的URL时,我无法生成数字,该URL用于访问他的页面:/?pid = N094I

它只是我的数据库中的一个值,由触发总和设置,并在客户输入金额后显示给客户。 当我在浏览器中单击“刷新”时,它显示旧值,但是当我在URL窗口中重新输入相同的链接时,该值将更新。

我在Firefox 61.0.2和Chrome 68.0.3440.106上尝试了相同的行为,“刷新”按钮不起作用,重新输入相同的链接会在字段中显示更新的值。

我的htaccess配置:

 <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, 11 Jan 1984 05:00:00 GMT"
      </ifModule>
</filesMatch>

响应标头显示它没有存储:

Cache-Control: no-cache, must-revalidate, max-age=0
Connection: Upgrade, Keep-Alive
Content-Encoding: gzip
Content-Type: text/html; charset=UTF-8
Date: Tue, 04 Sep 2018 08:13:01 GMT
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Keep-Alive: timeout=2, max=100

0 个答案:

没有答案