Re: [whatwg/fetch] How are reloads mapped to cache modes? (#524)

Yeah, max-age=0 and no-cache are very similar, but the spec use "MUST NOT" only for no-cache. I think this is the reason why browsers use no-cache for the hard-reload historically.

One confusing point of the Fetch cache mode spec to me is that it defines HTTP-network-or-cache fetch as

 - no-cache appends "max-age=0" if there is no Cache-Control header
 - no-store and reload append "no-cache" if there is no Cache-Control header

no-cache does not append "no-cache" but no-store and reload append "no-cache". I'm afraid that this will make many developers confused.
https://fetch.spec.whatwg.org/#http-network-or-cache-fetch step 14 and 15.

IMHO, one of what developers want to clarify is what cache mode is set when a user triggers reload UI, navigation UI, or when `Location.reload()` / `History.go()` / `back()` / `forward()` is called. This should be the same value among all browser implementations. Unfortunately, we do not have a spec that clarifies how browsers should behave in HTTP layer for reload and history navigation, IIUC.  It would be great if we clarify it, but probably it would not be in this spec, and it isn't a good idea to mention details what kinds of Cache-Control should be set for each cache mode here?

Even if we removed Cache-Control explanations, I think cache mode name should be still consistent with actual implementation, e.g. we may want to swap reload and no-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/524#issuecomment-293160883

Received on Tuesday, 11 April 2017 06:13:33 UTC