[slightlyoff/ServiceWorker] consider fetching service worker scripts with no-cache by default (#893)

Lately I've found myself recommending to people that they use `Cache-control: no-cache` or `max-age: 0` on their service worker script resources.  It seems best practice in order for service worker updates to be detected as devs expect.

Should Update algorithm just fetch the service worker script with `Request.cache='no-cache'` by default?  One could argue that an "update check" is semantically similar to pressing the refresh button.

Note, in firefox our http cache treats the default case with no cache-control headers as "cache forever".  I'm not sure if this is true in other browsers, but it makes this footgun a bit worse for us.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/893

Received on Monday, 9 May 2016 19:57:14 UTC