offline-worker
v1.1.0
Published
service worker for pwa - use fresh then cache response
Downloads
71
Readme
offline-worker
installation
$ npm i offline-worker --save-dev
$ cp node_modules/offline-worker/worker.js public
where public is your public/static directory
then in your front-end code use:
import register from 'offline-worker';
register();
result
your service worker makes your page run offline
first getting fresh requests, and falling back on cache