Re: [whatwg/fetch] {cache: "no-cache"} vs Cache-Control: immutable (#308)

> So here is the conflict: should fetch(aURLWithImmutableCache, {cache: "no-cache"}) send a conditional request first or use the cache directly without sending any request? Currently Firefox's behavior is the latter.

Here is how I view it:

1. `fetch(url, { cache: 'no-cache' })` is a signal from the js level to the http cache that resource revalidation is needed at the app level.  This is the same as if the reload button in the browser UX is pressed.
2. The http cache looks in its meta-data for the resource and see the immutable flag.  This is interpreted as the resource automatically passing revalidation.
3. The resource is returned from the http cache directly without any network activity.

If you don't want this behavior, then you can do one of the following:

* Don't use immutable on your resources
* Set your Request.cache value to `no-store` or `reload` to completely bypass the http cache

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/308#issuecomment-243155311

Received on Monday, 29 August 2016 15:28:46 UTC