What is "Cache-Control: no-cache" in "Request headers" exactly doing?

See: http://www.freesoft.org/CIE/RFC/2068/168.htm

The request includes a “no-cache” Cache-Control directive or, for compatibility with HTTP/1.0 clients, “Pragma: no-cache”. No field names may be included with the no-cache directive in a request. The server MUST NOT use a cached copy when responding to such a request.

See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

Caching directives are unidirectional, meaning that a given directive in a request is not implying that the same directive is to be given in the response.

and

no-cache
Forces caches to submit the request to the origin server for validation before releasing a cached copy.

So actually on the Mozilla website, they are saying this is the definition of “no-cache” for a request and for a response. Otherwise they had to give 2 definitions (one for requests and one for responses). But that’s not the case. From this definition, I would say in some cases the cached copy will be used.

But in the first quote from Freesoft.org, they are saying:

The server MUST NOT use a cached copy when responding to such a request.

But with “no-cache” I would expect a check if some content has been changed. But if the content has not changed, then I would expect a cached copy would be used.

So how I have to see this? Now to me it looks like both definitions contradict each other.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.