Making my site work offline had been on my bucket list for a while. It was the last thing in Google Chrome’s Lighthouse test to complete. The site now has close to 100 scores across all areas in Google Chrome’s Lighthouse Audit.
I then read this article https://css-tricks.com/serviceworker-for-offline/ which helped me create my service worker.
You can view the code I used in this repo on GitHub.