如何在页面加载时清除浏览器缓存

时间:2021-02-20 04:49:40

标签: php html jquery

header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

我尝试使用上面的代码,但在某些系统上它不起作用。例如,在我客户端的浏览器中它不起作用。页面加载时清除浏览器缓存的全局方法是什么?

1 个答案:

答案 0 :(得分:0)

元数据主要在浏览器中工作,有助于清除缓存

<meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Expires" content="-1" /> 
相关问题