Re: [whatwg/fetch] Only-if-cached (#159)

The spec change didn't address the "not supporting cached redirects" decision reached.  Should this be accomplished by requiring that redirect mode be set to "error" like the requirement that the request mode be "same-origin"?

Specifically, line 22 of the Request constructor is currently `If request's cache mode is "only-if-cached" and request's mode is not "same-origin", then throw a TypeError.` but it could be augmented to be: `If request's cache mode is "only-if-cached" and request's mode is not "same-origin" and request's redirect mode is not "error", then throw a TypeError.`

This shares the advantage with the same-origin strategy that if the constraint is relaxed in the future then existing code will not observe a change in behavior until the code is changed.  (And the code can somewhat detect the presence of the constraint or not by whether the request constructor throws.)

---
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/159#issuecomment-221799084

Received on Thursday, 26 May 2016 07:37:27 UTC