Why use Cache-control headers in request?

Source: Internet
Author: User

The local cache is also part of the cache proxy.

Use Cache-control to represent cached usage policies when requested.

The No-cache in the request header indicates that the browser does not want to read the cache, not the cache. Generally in the browser press Ctrl+f5 Force Refresh, the request head has this no-cache, that is, skip the strong cache and negotiate cache phase, directly request the server. (If you press F5 directly, the request header is max-age=0, only the strong cache is skipped, but the cache is negotiated)
And the response head max-age=259200, not very clear, not verified.

http://bbs.csdn.net/topics/391022213

There may is any number of intermediate proxies between the client and server which do caching. The client can explicitly request explicit caching behaviour from any and all caching entities, things like:

    • max-age-"I don ' t want a response older than X"
    • no-cache-"I want a fresh response"
    • no-transform-"I don t want it unless it ' s the original"
    • only-if-cached-"Don ' t bother the origin server if you Don ' t have it already"

As with all requests, servers has a certain leeway in whether to honour the request or not. Just because a client insists on an uncached response doesn ' t mean it's necessarily going to get it.

Https://stackoverflow.com/questions/42652931/why-use-cache-control-header-in-request

Cache-Control: no-cacheis generally used in a request header (sent from web browser to server) to force validation of the resource in the Interme Diate proxies. If the client doesn ' t send this request to the server, intermediate proxies would return a copy of the content if it is fre SH (have not expired according to Expire or fields max-age ). Cache-Control directs these proxies to revalidate the copy even if it is Fresh.

Https://stackoverflow.com/questions/14541077/why-is-cache-control-attribute-sent-in-request-header-client-to-server

Why use Cache-control headers in request?

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.