http/1.1 Cache-control's understanding (Turn)

Source: Internet
Author: User

The caching of the Web page is controlled by the "Cache-control" in the HTTP message header, the common value has private, No-cache, Max-age, must-revalidate, etc., the default is private. Its role is divided into the following situations according to different ways of re browsing:
(1) Open a new window
If the specified Cache-control value is private, No-cache, and Must-revalidate, the server will be accessed again when a new window is opened. If the Max-age value is specified, the server is not again accessed within the time of this value, for example:
Cache-control:max-age=5
Indicates that accessing the Web page after 5 seconds will not go to the server
(2) Enter in the Address bar
If the value is private or must-revalidate (unlike what is said on the web), the server is accessed only on the first visit and is no longer accessible. If the value is No-cache, it is accessed every time. If the value is Max-age, the access is not repeated until it expires.
(3) Press the Back button
If the value is private, must-revalidate, Max-age, it will not be accessed, and if No-cache, repeat access each time
(4) Press the Refresh button
Regardless of the value, repeated access


Use filters in projects to set Web page caching

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.