Artificial girl 3 modifier no Discovery program with PHP program to support page fallback two ways

Source: Internet
Author: User
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.

  • Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.