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

Let me check if I understand this thread correctly.

The original proposal:
If a user specify "default" for Request.cache, browser want to modify it to relevant cache mode before showing it to SW on fetch event as it does for requests for page loading.

This will help users to support reload or other navigations like back/forward correctly without any extra efforts.

On the other hand, users can manually implement their own reload or navigation strategy by referring window.performance.navigation.type to decide the request cache mode.

I'm not sure changing "default" behavior is a good idea. Adding "auto" would be another choice to have such options for users. Otherwise, users could not specify to enforce using the mode to follow the cache protocol.

FYI, basically in Chrome, created img or script resources would use per-frame cache mode until onload event is fired. Resources created after the event just follows the cache protocol. But this is NOT true for XHR. FrameFetchContext manages such cache mode decisions in Chrome.

-- 
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-293195430

Received on Tuesday, 11 April 2017 08:59:41 UTC