PHP supports two methods of page rollback

怪我咯
Release: 2023-03-13 18:54:01
Original
1116 people have browsed it

During the development process, often due to form errors, the information filled in when returning to the page is missing. In order to support page bounce, this can be achieved through two methods.
First, use the Header method to set the message header Cache-control

header('Cache-control: private, must-revalidate');  //支持页面回跳
Copy after login

Second, use session_cache_limiter Method

//注意要写在session_start方法之前  
session_cache_limiter('private, must-revalidate');
Copy after login

The above is the detailed content of PHP supports two methods of page rollback. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!