A Service Worker shim to cache all requests and respond with the latest cached content
A simple, bare minimum service worker that would cache all the requests, and can be used as a boiler plate to immediately take your webapp offline.
Explanation is annotated in the source code - index.js
.
For online example see https://boopathi.github.io/sw-cache-all/