瀏覽器會緩存所有的GET請求數據。
客戶端解決辦法:
在請求地址上多加一個時間戳:http://xxx.yyy.zzz?_t=1503628217337
Date.now();
服務器解決辦法:
響應標頭加上如下參數:
Cache-Control: no-cache
Expires: -1
Pragma: no-cache
.net mvc可以在Action上加特性標記
[OutputCache(Duration = 0, VaryByParam = "none")]
參考文章:
https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Cache-Control
https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Expires
https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Pragma