The Web cache is controlled by the Cache-control in the HTTP message header, and the common values are private, No-cache, Max-age, Must-revalidate, and so on.
Browser access is divided into the following types of methods:
1, open a new window
In this case, the private,no-cache,must-revalidate will re-access the server
Max-age will not be re-accessed within the set time. If max-age=5, the server will not be accessed within 5 seconds
2. Enter the address in the address bar
In this case, Private,must-revalidate will revisit the server the first time
Max-age will not be re-accessed within the set time. If max-age=5, the server will not be accessed within 5 seconds
No-cache re-accessing the server
3, when you refresh the page
Will re-access the server
4, press backspace back key when
Private,must-revalidate,max-age does not access the server
No-cache re-accessing the server
The following code:
<?php
Header (' cache-control:private,must_revalidate ');
?>
can control caching
This article from "Chensir" blog, declined reprint!
PHP header (' cache-control:***,***,*** ')