I've successfully implemented a service worker on my website. The home page loads correctly from the Service Worker cache, and when I visit previously viewed 'posts' while online in Chrome, they load and show as 'from ServiceWorker' in the developer tools.
However, when I switch Chrome to offline mode using the developer tools, the pages return a status of 'failed'
I'm curious about why this issue is happening. Any insights?
Here is my serviceworker script
And here is my ServiceWorker registration script