文章详情
html-php网页禁止资源等缓存策略,获取服务器最新数据
Posted on 2017-05-23 08:48:38 by 主打一个C++
1. php头部添加方法
<?php
header("Cache-Control: no-cache, no-store, must-revalidate");
header("Pragma: no-cache");
header("Expires: 0");
?>
2. meta标签添加方法
<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">
*转载请注明出处:原文链接:https://cpp.vin/page/116.html