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 achieved in two ways.
First, use the header method to set the message header Cache-control
Header (' Cache-control:private, Must-revalidate '); Support page Bounce
Second, using the Session_cache_limiter method
Note to write before the Session_Start method
Session_cache_limiter (' Private, must-revalidate ');
Ps:cache-control Message Header Field description
CACHE-CONTROL Specifies the caching mechanism that the request and response follow. Setting Cache-control in a request message or in a response message does not modify the caching process during another message handling process. The cached instructions at 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 handled by the shared cache. This allows the server to simply describe a partial response message from the user, which is not valid for other users ' requests.
No-cache indicates that a request or response message cannot be cached
No-store is used to prevent important information from being inadvertently released. Sending in a request message will not use caching for both request and response messages.
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 response times that are less than the current time plus a specified time.
Max-stale indicates that the client can receive response messages that exceed 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.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.