Cache Website Assets in “Offline Mode”
Using a Javascript Service Worker
An “Offline Mode” can be an added benefit if you are building on a normal web app, or a required feature if you are building a Progressive Web App. The most basic version of an offline mode is a cache of static assets and a way to access them when offline.
In this post we’ll write a Service Worker and build an offline mode for a JS app with a live demo here.