androidprogressive-web-appsofflineapps

Hunting a spooky offline.html


I once wrote a quick ‘offline.html‘. Just be be sure I understood how offline PWA worked:

This is offline.html (My App Name)

I thought it worked as expected. So I deleted it and wrote a better one, with a back button, some info etc.

Now when this app is offline it starts on the page the manifest.json days, as expected.

However, if I try to refresh the page that spooky "offline.html" shows up. From nowhere.

I've tried to understand where it lurks, but I can't find it. (The new "offline.htmi" is there when I go to it in the web browser.)

I've tried Firefox offline on my mobile to see if the spoky "offline.html" jumps up there to. It does. 😐

I've cleared the cache in Chrome. The spoky "offline.html" is still there.

Any ideas?

(This is on Android 9)


Solution

  • Offline pages are not exactly stored in caches as regular cached items, there are stored quite differently, relative to the current installed service worker. I tried looking for an article to explain this more but can't walk around any currently.

    However you'll have to unregister your service worker or learn how Updating service worker works,

    The aim is to remove the lurking offline.html served to the new offline.html that exists.