Home >Backend Development >PHP Tutorial >PHP disables browser caching

PHP disables browser caching

WBOY
WBOYOriginal
2016-08-08 09:19:141480browse
  1. //Tell the browser that the data returned is in XML format
  2. header("Content-Type: text/xml;charset=utf -8" );
  3. //Tell the browser not to cache data
  4. header("Cache-Control: no-cache");
  5. ?>

The above introduces the prohibition of browser caching in PHP, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

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