How to set page expiration in php

藏色散人
Release: 2023-03-05 16:34:01
Original
2260 people have browsed it

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.

How to set page expiration in php

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");
Copy after login

PHP settings page does not expire

session_cache_limiter('private,must-revalidate');
Copy after login

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!

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template