First, use the header method to set the message header Cache-control
QUOTE:
Header (' Cache-control:private, Must-revalidate '); Support page Bounce
Second, use the Session_cache_limiter method
QUOTE:
Note to write before the Session_Start method
Session_cache_limiter (' Private, must-revalidate ');
Add:
Cache-control Message Header Field description
CACHE-CONTROL Specifies the caching mechanism that requests and responses follow. Setting Cache-control in a request message or response message does not modify the caching process in another message processing process. The cache directives for the request include No-cache, No-store, Max-age, Max-stale, Min-fresh, only-if-cached, and the instructions in the response message include public, private, No-cache, No-store, No-transform, Must-revalidate, Proxy-revalidate, Max-age. The instructions in each message have the following meanings:
Public indicates that the response can be cached by any buffer.
Private indicates that the entire or partial response message for a single user cannot be shared with the cache. This allows the server to simply describe a partial response message for the user, and this response message is not valid for another user's request.
No-cache indicates that a request or response message cannot be cached
No-store is used to prevent the inadvertent release of important information. Sending in the request message will make the request and response messages do not use the cache.
Max-age indicates that the client can receive a response that is not longer than the specified time (in seconds).
Min-fresh indicates that the client can receive a response that is less than the current time plus a specified time.
Max-stale indicates that the client can receive a response message that exceeds the timeout period. If you specify a value for the Max-stale message, the client can receive a response message that exceeds the specified value for the timeout period.
About form Refreshes
Q: Why did I click the Back button of my browser and all the fields were emptied?
Answer: This is because you used the Session_Start function in your form submission page. This function forces the current page to not be cached. The workaround is to add the header ("Cache-control:private") after your session_start function; Note that your PHP program cannot have any output before the bank.
Add: There is also a session-based solution, which is preceded by a session_start
QUOTE:
Session_cache_limiter (' NoCache ');//emptying the form
Session_cache_limiter (' private '); Do not clear the form until the session is in effect
Session_cache_limiter (' public '); Do not empty the form as if you did not use the session
Session_cache_limiter ("private,max-age=10800") can be added to the session_start ();
The above describes the artificial girl 3 modifier did not find the program with PHP program to support the page back two methods, including the artificial girl 3 modifier did not find the content of the program, I hope that the PHP tutorial interested in a friend helpful.