Re: [w3c/ServiceWorker] Proposal: Allow addEventListener/removeEventListener for 'fetch' to called at anytime (#1195)

> That isn't something SW caches can do. I guess you mean you just delete them manually?

I meant the stored resources are now all stale since the server revision updated and thus any stored resources will never be used. If the FB SW does a load a week later then the SW knows everything in the SW cache is stale and nothing will be used. Ideally for this a SW would want to start negotiating an update with the server which can take time to run in the background. During that period the `fetch` handler should be disabled since it is not providing any benefit and is just extra overhead.

Before we discuss adding a new API I'd really like to have an explicit public discussion ruling out this proposal. I haven't seen a good argument so far for why we can't just allow add/remove at anytime and let the browser optimize based on the current state?

How is `swRegistration.fetch.disable()` superior to `removeEventListener('fetch', handler)`?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1195#issuecomment-331973324

Received on Monday, 25 September 2017 18:37:52 UTC