Recently, I used php as a project and used post to submit data. There are sessions in it for record. It is okay to run it, but there is a small problem, after the submission, the page will expire when you want to return to the previous page. You need to click Refresh to open the page. You can add a statement on the PHP page to solve this problem.
Header ("cache-control: Private ");
· PHP back-to-page expiration or no problems
Cache-control. common values include private, no-cache, Max-age, and must-revalidate. The default value is private. The function of browser review is divided into the following situations:
1> open a new window. If the cache-control value is private, no-cache, or must-revalidate, the server will be accessed again when the new window is opened. If the max-age value is specified, the server will not be accessed again during this period, for example: cache-control: max-age = 5 indicates that the server will not be accessed again within 5 seconds after the webpage is accessed
2> in the address bar, press Enter. If the value is private or must-revalidate (different from that on the Internet), the server will be accessed only when the first access is made and will not be accessed later. If the value is no-cache, it will be accessed every time. If the value is Max-age, the access will not be repeated before expiration.
3> press the back button. If the value is private, must-revalidate, or Max-age, no re-access will be performed. If the value is no-cache, the re-access will be performed each time.
4> press the refresh button to repeat all the values. When the specified cache-control value is "no-Cache", accessing this page will not leave a page backup in the temporary article folder on the Internet.