客户端添加如下代码
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache,must-revalidate">
<meta http-equiv="expires" content="Wed, 23 Aug 2006 12:40:27 UTC" />
或者在 PHP服务端添加如下代码
header("Cache-Control:no-cache,must-revalidate,no-store"); //这个no-store加了之后,Firefox下有效
header("Pragma:no-cache");
header("Expires:Wed, 23 Aug 2006 12:40:27 UTC");
上面的代码经验证在FF下有时会不行,经修正如下,在FF下可以不缓存页面
客户端添加如下代码
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate,no-store">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
<META HTTP-EQUIV="expires" CONTENT="0">
或者在 PHP服务端添加如下代码
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate,no-store");
header("Pragma: no-cache");