Get the App
SLTechnology News&Howtos  ›  Development  › 

How to disable caching by using header () in php

Shulou Source: shulou.com Published: 2022-06-03 19:25:17 11月12日 Update

This article mainly explains "how php uses header () to disable caching". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how php uses header () to disable caching".

Operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer

Php prohibits browsers from using cached pages

You can do this by sending a specific cache control of the original HTTP header through the header () function of php. The specific code is as follows:

Thank you for your reading, the above is the content of "how php uses header () to prohibit caching". After the study of this article, I believe you have a deeper understanding of how php uses header () to prohibit caching, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Cache learning content original code function that is ideas situations tutorials articles more browsers environments computers knowledge knowledge points articles systems follow Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Docker OPPO Reno MariaDB Linux