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