Relative Content

Tag Archive for javascriptprogressive-web-apps

service-worker process seems to stop on page navigation

I am a bit of a PWA novice – and I’m trying to use messaging from the front-end to a service-worker.js to trigger the download of images one by one on a page. This causes those images to be auto-cached through my fetch event. To track things – I have a simple dial on each page to indicate how many images are cached.

Standalone display becomes browser in PWA after login via Google

Imagine I have a pwa with display: standalone configured in manifest. Everything works fine, browser navigation is not displayed before I log in via google, because of redirects after authorization, an application opens with display: browser. Does anyone know how to fix this so that there is always display: standalone?

Is there a way to force an Android PWA to go back to its “start_url” from Javascript?

My app dynamically generates manifest.json for each user, so that there can be multiple homescreen shortcuts, each pointing to the user’s unique start_url. However, in case of a server error (and other cases), I’d like to have a link that lets the user go back to the initial page for that PWA. And because of the way that the app is designed, I can’t use any information provided by the server (session, cookies, etc.) — this has to be done purely in Javascript inside the PWA itself.