Very simple code to demonstrate Progressive Web Apps.
This demo app runs on localhost.
npx http-server -c-1 # disable cacheThen open http://localhost:8080 with Chrome.
Change version in sw.js to update app version.
- Why
-c-1to 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.
MIT