In the development process, often because the form error and return to the page when the information is missing, in order to support page bounce, can be implemented by PHP two methods.
First, use the header method to set the message header Cache-control
Header (' Cache-control:private, Must-revalidate '); Support page Bounce
Second, use the Session_cache_limiter method
Session_cache_limiter (' Private, must-revalidate ');//note to be written before the Session_Start method
Ps: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. Cache directives on request include No-cache, No-store, Max-age, Max-stale, Min-fresh, only-if-cached, directives in response messages including 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 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. The
No-cache indicates that the request or response message cannot be cached
No-store is used to prevent important information from being inadvertently published. Sending in the request message will make the request and response messages do not use the cache. The
max-age indicates that the client can receive a response that is not longer than the specified time (in seconds). The
Min-fresh indicates that the client can receive a response that is less than the current time plus a specified time. The
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.
Above describes the PHP implementation of the page back to save the form content of the two methods, including the content, I hope to be interested in PHP tutorial friends helpful.