Home > Article > Backend Development > How to set page expiration in php
php method to set page expiration: first open the corresponding PHP page file; then pass [header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );] method to set page expiration.
Recommended: "PHP Video Tutorial"
PHP settings page expired
Today I encountered the problem of setting the expiration of PHP pages. Some pages have expired before, and some have not expired. Delete the HTML code about expiration in the page, and use the following code to uniformly control the expiration of the form page submitted under IE. Situation
PHP settings page expires
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); 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");
PHP settings page does not expire
session_cache_limiter('private,must-revalidate');
The above is the detailed content of How to set page expiration in php. For more information, please follow other related articles on the PHP Chinese website!