[ ] 2) Test that it works on https://service.tjcav.com/admin: after your first visit to the website, it should work offline.
[ ] 3) As files get updated or added, we can automatically update the list of appShellURLs using a bash script. We could make an npm script to call it to update the list of .js, .css, .html, image files, etc. Here's an example that updates the sw above (also will need to be edited for Sporeas): copy-chunks-to-service-worker.sh
[ ] 4) Bonus: chrome lets you turn a website into a web app that users can add to their home screen, as long as it follows certain requirements. That includes a working service worker and manifest file. Example that goes with the other 2 files above: manifest.webmanifest
[ ] 1) The key: use a service worker. Here's an example I made that automatically stores and serves the files listed in
appShellURLs
: https://github.com/hchiam/code-inspiration/blob/master/public/my-service-worker.js It'll need to be edited for Sporeas, depending on the bash script stuff in 3) below.[ ] 2) Test that it works on https://service.tjcav.com/admin: after your first visit to the website, it should work offline.
[ ] 3) As files get updated or added, we can automatically update the list of
appShellURLs
using a bash script. We could make an npm script to call it to update the list of .js, .css, .html, image files, etc. Here's an example that updates the sw above (also will need to be edited for Sporeas): copy-chunks-to-service-worker.sh[ ] 4) Bonus: chrome lets you turn a website into a web app that users can add to their home screen, as long as it follows certain requirements. That includes a working service worker and manifest file. Example that goes with the other 2 files above: manifest.webmanifest