Open jcalvor opened 8 years ago
@jcalvor what does your service worker file actually look like? Did you manage to get a simple service worker doing something first, or are you hitting problems straight out of the box?
I recommend that if you are starting with a service worker that does a bunch of complicated precaching that you get something simple going and build up from there.
importScripts('path/to/sw-toolbox.js');
toolbox.options.debug = true;
toolbox.router.get('/test', () => new Response('Test'));
If you use the service worker above (edited to have the real path to toolbox), what happens if you navigate to /test
after the service worker has installed?
@jcalvor Actually, having read your comment again, can you confirm which project you are actually talking about?
sw-toolbox
(this project) is a library to help you write a service workersw-precache
is a tool that can build a service worker for you (possibly in a gulp script)platinum-sw
is a set of Polymer components that wrap around sw-toolbox
HI, I followed all the steps for the service worker but it doesn't work. should also manipulate the cache-config.json file? I was also watcing a video from the google developers channel (https://www.youtube.com/watch?v=BucGrYACJdQ&list=PLNYkxOF6rcIDdS7HWIC_BYRunV6MHs5xo&index=29) but it seems they use an old version since in the gulp file they are using a 'precache' and the documentation says 'cache-config'. so I am a little confuse...