Re: [whatwg/fetch] Should the cache control default mode match how the page is loaded? (#289)

> I think the reason for this proposal is giving the users control over what behavior fetch() has (as opposed to the developer), similar to what browsers currently are doing for the top-level resource and its subresources.

We already provide maximum flexibility for devs by doing `fetch(url, { cache: 'no-store' })` or whatever cache policy they want.  I don't know why adding a magic global default would improve this flexibility.  I think it would just confuse everyone.

I think it would be less breaking and less surprising if we exposed how the document was loaded and then let script decide what they want to do.  Something like `document.loadedRequest`.  Then they could do `fetch(url, { cache: document.loadedRequest.cache })` to inherit the http cache policy used to request the document.

> Note that Facebook is proposing changing what the reload button does by making it only validate the main page but not subresources, and apparently Chrome is on board. If that behavior change gets adopted by browsers, that will change the landscape around this issue. 

Well, I have my doubts as you can see from my comments in that bug.

---
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/289#issuecomment-214573466

Received on Tuesday, 26 April 2016 00:42:16 UTC