offline-worker
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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

/offline-worker/

    Package Sidebar

    Install

    npm i offline-worker

    Weekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    3.82 kB

    Total Files

    6

    Last publish

    Collaborators

    • jacekpietal