Re: [slightlyoff/ServiceWorker] Service worker updation doesn't work as expected (#946)

Currently we only evaluate byte-for-byte differences in the top level service worker script.  Changes in your `importScripts()` will not trigger an update today.  (We are changing that, however.)

I think what is probably biting you is that we also honor http cache for service worker scripts.  So if you are serving your main service worker script with a max-age then you won't see updates until the cached version ages out.  (Or after 24 hours when we bypass the cache.)

We recommend that you serve your service worker script with cache-control:no-cache in order to avoid this issue.  (And we are also going to make this the default in the future.)

Does that help?

---
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/946#issuecomment-238756556

Received on Wednesday, 10 August 2016 03:29:33 UTC