Home  >  Article  >  Backend Development  >  PHP supports two methods of page rollback

PHP supports two methods of page rollback

怪我咯
怪我咯Original
2017-07-12 15:51:491113browse

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');  //支持页面回跳

Second, use session_cache_limiter Method

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

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!

Statement:
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