9

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

Allain Lalonde
  • 91,574
  • 70
  • 187
  • 238
  • Possible duplicate of [Why is Cache-Control attribute sent in request header (client to server)?](http://stackoverflow.com/questions/14541077/why-is-cache-control-attribute-sent-in-request-header-client-to-server) – starcorn Oct 30 '16 at 18:32

2 Answers2

6

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.

Snukker
  • 1,963
  • 3
  • 18
  • 18
-3

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

Chi
  • 22,624
  • 6
  • 36
  • 37
  • 2
    I didn't downvote, but I think it's because it only deals with the headers from the server and not the confusing client ones. – Allain Lalonde Jun 08 '09 at 19:23
  • That's right, this question is specifically talking about when the Client sends that header. – William Denniss Mar 01 '13 at 02:47
  • 1
    This answer mistakes the Cache-Control on the Client with an the server, simply the wrong answer. Downvoted since this answer should have been deleted by the @Chi already – Eugen Mayer Aug 30 '19 at 13:06