龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > php编程 >

php 5 行 PHP 代码禁用 HTTP 缓存

时间:2014-07-22 15:53来源:网络整理 作者:网络 点击:
分享到:
5 行 PHP 代码禁用 HTTP 缓存 [代码片段(7行)]
header("Content-Type: application/json");
header("Expires: 0");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
//该片段来自于http://outofmemory.cn
精彩图集

赞助商链接