http - What's the difference between Cache-Control: max-age=0 and no-cache? -


header cache-control: max-age = 0 means content is stale (And must be recovered again), which is the same thing as the cache-control: no-cache .

I had this question, and got some information in my searches (your question came as a result ). Here I have decided ...

Cache-Control is on the other side of the header where on one side it can be sent through the web server (aka "Basic Server"). On the other hand it can be sent through the browser (aka "user agent").


when sent by the original server

I believe max -iz = 0 simply tells the cache (and user agent) That receptions are on the go and therefore, they should revise the Need response (like if-not before using the copy of the cache, modified header) while < Code> no-cache tells them to re-modify Required before using a cached copy:

No-cache

... A server must use the response to complete a cache without any successful request. This prevents an originating server from caching from the cache, which is configured to return stereo responses to client requests. In other words, cash can sometimes choose to use stale feedback (though I believe they need to add a warning header, but no-cache Say that they are not allowed to use stale feedback, no matter who you are, you may want - want to re-validate behavior when the baseball statistics are generated in one page But you want Necessary - You can re-verify the behavior while preparing the response. For the purchase of e-commerce.

Although you are right in your comment when you say that Cash is not considered to stop storage, it can actually be another difference no cache . I came to a page, which says (I guarantee bailout I'm not):

In practice, IE and Firefox have no cash open It has started treating prostate as it gives instructions to the browser, not even to cache the page. We started thinking about this behavior a year ago. We suspect that this change was inspired by the extensive (and wrong) use of this instruction to prevent caching.

...

By late, "Cash-control: no-cache" has started behaving like a "no-store" directive.

On the one hand, I see that cache-control: max-age = 0, should be -upplied basically the same thing as Cash-Control: No-Cash should be like. So it is possible that this is a way of retrieving the behavior of Necessary - no-cache , while the clear migration of no-cache By avoiding no-store (i.e. no any caching) the same thing as


when user agent

I believe that the user applies the agent side you can see.

If a user sends a request with agent cache-control: maximum-age = 0 (aka "end-to-end rationalization"), then each along the path The cache will be modified in its entirety on the original server with its cache entry (such as if-not-modified header). If answer is 304 (not modified), then the cached unit can be used.

On the other hand, cache-control: no-cache (aka "end-to-end reload") does not modify again and the server is cached for responding The copy should not be not used.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -