1.0.1 • Published 1 year ago
offline-worker v1.0.1
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