This is a crude, example application which demonstrates using a ServiceWorker to cache assets so that if the user were to go offline, the page would still load and serve as if it were online. It has been built upon the rehabstudio FE Skeleton so any specifics about installation or setup can be read from that repositorys documentation.
To install and run the application, do the following:
npm install
gulp server
- Your first offline web app | Web Fundamentals - Google Developers
- Making an offline web app with Service Workers | Ole Michelsen
- slightlyoff / ServiceWorker
This code has been uploaded to a Heroku application. If you load it once with internet connection then disable your network (either via throttling in dev tools or physically disconnecting from your network) and refresh the application, it should load instantly (served from ServiceWorker) and be fully usable.