php 关闭页面加载缓存

来源:互联网 发布:免费下载淘宝旺旺 编辑:程序博客网 时间:2024/06/05 05:12

因项目需求,需每次加载php实时文件。

只需要在文件头部加上

header("Expires:  -1");
header("Cache-Control:  no_cache");
header("Pragma:  no-cache");


另外html对应ajax加上

cache:false,