Offline mode works except for one very odd scenario.
- PWA is installed and service workers/assets are cached
- App entry point (app.component.ts::ngOnInit) has initialization logic
- IF initialization fails AND the user's device has internet THEN ping the server (and check if the database is connectable)
- IF the server is down THEN activate offline mode
The above works, for the FIRST cold launch of the app when the server is down. On the second cold launch with the server down, I see a "502 Bad Gateway".
I notice in application tab in Chrome, storage increases from 7.3MB to 10.6MB on first cold launch with server down.
This might be a service worker related issue?