- From: Jake Archibald <notifications@github.com>
- Date: Thu, 21 Jan 2016 07:31:08 -0800
- To: slightlyoff/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Thursday, 21 January 2016 15:31:36 UTC
I'm not against delaying the update a bit for performance reasons (or at least suggest it can be low priority), but I don't think it fixes the original issue. Imagine: * Functional event lands in SW * More than 24hrs since update, so update triggered, updated SW found, becomes installing * User navigates to in-scope page * "updatefound" listener added * Update triggered, SW is byte identical so it's ignored * SW moves from "installing" to "installed" Even with the delay, the listener misses the new SW. The only safe way know when a SW becomes installed is to listen for "updatefound" but also track any current `reg.installing`. Eg https://github.com/jakearchibald/wittr/blob/cache-avatars/public/js/main/IndexController.js#L45. --- Reply to this email directly or view it on GitHub: https://github.com/slightlyoff/ServiceWorker/issues/788#issuecomment-173606879
Received on Thursday, 21 January 2016 15:31:36 UTC