Home  >  Article  >  php教程  >  5 行 PHP 代码禁用 HTTP 缓存

5 行 PHP 代码禁用 HTTP 缓存

WBOY
WBOYOriginal
2016-06-21 08:51:261608browse

  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");



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn