1、浏览器默认缓存时间
firefox 的缓存时间时长
(访问时间 - 最后修改时间) ÷ 10
例子:
假设 7点0分 访问的 5点0分修改的 index.html ,
那么缓存时间为
2*60*60 ÷ 10 = 720 秒
页面缓存时间为 720 秒
2、设置页面禁止缓存
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Expires" content="0" />
no-cache : 协商缓存
no-store : 不缓存
must-revalidate : 过期强制请求服务器
转载于:https://www.cnblogs.com/jiebba/p/11305410.html