|
|
|
|
|
by buddydvd
5014 days ago
|
|
RFC 2616 Section 14.9.1 states: 14.9.1 What is Cacheable
By default, a response is cacheable if the requirements of the
request method, request header fields, and the response status
indicate that it is cacheable.
Section 9.5 (for the POST request method): Responses to this method are not cacheable, unless the response
includes appropriate Cache-Control or Expires header fields. However,
the 303 (See Other) response can be used to direct the user agent to
retrieve a cacheable resource.
Responses to the POST request method are not cacheable by default according to the spec. |
|
> unless the response includes appropriate Cache-Control
Forgive me if I'm dense, but doesn't this "unless" clause mean exactly that if you include a Cache-Control header, the POST will be cacheable unless the Cache-Control header says otherwise? The discussion is then really about whether max-age 0 means "for 1 second" or "never". I don't see why it would be necessary for it to mean "never" when there are two other ways you can get that behavior: by specifying "no-cache" or by simply omitting the header.
The entire discussion is about a developer who uses the following header: