kelosun / minimal-pwa

An minimal example for PWA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minimal PWA

Very simple code to demonstrate Progressive Web Apps.

Usage

This demo app runs on localhost.

npm install http-server -g
http-server -c-1 # with cache disabled

Then open http://localhost:8080 with Chrome.

Change cacheStorageKey in sw.js to update app version.

Trouble shooting

  • Why -c-1 to disable cache?

sw.js can be cached by HTTP Caches, then in debugging we could get unexpected behaviors. Disable the cache to simplify the problem.

License

MIT

About

An minimal example for PWA


Languages

Language:JavaScript 43.2%Language:HTML 33.6%Language:CSS 23.2%