What does Cache-Control mean when a client uses it

2020-07-07 00:58发布

I thought I understood what the Http Header "Cache-Control: max-age=3600" meant but then I came across it in a client request as this:

Cache-Control: max-age=0

I'm not entirely sure what this means from a client's perspective.

Any insight would be great.

Thanks

2条回答
够拽才男人
2楼-- · 2020-07-07 01:30

The answer is explained here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.4

When used by user agents, its aim is to get intermediate caches to revalidate the response - so it's not for the server to deal with.

In server responses, max-age tells the client (and intermediate caches) how long to cache the response for.

查看更多
爷的心禁止访问
3楼-- · 2020-07-07 01:35

This means that the browser should NEVER cache the page, it should always retrieve a fresh copy of the page.

查看更多
登录 后发表回答