//java servlet中配置
response.setHeader("Cathe-Control","no-cache");
response.setHeader("pragma","no-cache");
response.setDateHeader("expires",-1);
//PHP中设置
header("Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" );
header("Cache-Control: no-cache, must-revalidate" );
//页面中配置
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
设置取消缓存
最新推荐文章于 2021-02-16 20:00:42 发布