GoogleChromeLabs / sw-toolbox

[Deprecated] A collection of service worker tools for offlining runtime requests
https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
Apache License 2.0
3.62k stars 331 forks source link

Service worker isn't updated when new one is present #248

Open florent1933 opened 7 years ago

florent1933 commented 7 years ago
capture d ecran 2017-05-11 a 00 05 03

It's waiting to activate all the time and the date below installing seems strange : 1970

In index.html :

<script src="bower_components/sw-toolbox/companion.js" data-service-worker="otium-service-worker.js"></script>

In the service workers :

importScripts('bower_components/sw-toolbox/sw-toolbox.js');

toolbox.router.get('/assets/:folder*/:file', toolbox.networkFirst);
toolbox.router.get('/index.html', toolbox.networkFirst);
toolbox.router.get('/favicon.ico', toolbox.networkFirst);

toolbox.router.get('/bower_components/:folder*/:file', toolbox.fastest);

toolbox.router.get('/:id.bundle.js', toolbox.cacheFirst);
toolbox.router.get('/:id.bundle.css', toolbox.cacheFirst);
giupo commented 5 years ago

I dunno if it helps, but here: https://youtu.be/cmGr0RszHc8?t=448 @jakearchibald states it's a known bug.