I don't find get the practical difference between Cache-Control:no-store
and Cache-Control:no-cache
.
As far as I know, no-store
means that no cache device is allowed to cache that response. In the other hand, no-cache
means that no cache device is allowed to serve a cached response without validate it first with the source. But what is that validation about? Conditional get?
What if a response has no-cache
, but it has no Last-Modified
or ETag
?
Regards.
As far as I know, no-store means that no cache device is allowed to cache that response. In the other hand, no-cache means that no cache device is allowed to serve a cached response without validate it first with the source.
Cache-Control: No-Store The no-store directive means browsers aren't allowed to cache a response and must pull it from the server each time it's requested. This setting is usually used for sensitive data, such as personal banking details.
Cache-control is an important way by which developers can dictate how resources will be cached when a user browses the internet. Without cache-control, the browser caching and the resulting experience for the user will be sub-optimal.
If there is no cache available, the browser can't load data from the cache, which is the same as disabling cache. Using the extension isn't any complicating either.
See the below flow chart for better understanding
Ref: (https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching?hl=en#cache-control)
But what is that check about?
Exactly checking Last-Modified
or ETag
. Client would ask server if it has new version of data using those headers and if the answer is no it will serve cached data.
Update
From RFC
no-cache If the no-cache directive does not specify a field-name, then a cache MUST NOT use the response to satisfy a subsequent request without successful revalidation with the origin server. This allows an origin server to prevent caching even by caches that have been configured to return stale responses to client requests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With