Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue opening PWA via links on android devices while offline #55

Open
dberardo-com opened this issue Nov 14, 2024 · 1 comment
Open

Comments

@dberardo-com
Copy link

i am using vite pwa to build and run PWAs on both windows and android.

the PWA currently works fine in offline mode once open on both platforms, but i am having an issue on android devices.

in particular on android it is possible to associate a PWA to a FQDN when opening a link, so that android opens the link in the PWA by default.

in such instances it seems that when clicking on different links in offline mode, the PWA won't be started by android due to "You are offline". The PWA would be started however in case the link used was already open at least once by the PWA, but not with new links (e.g. with different query params).

is this a limitation of vite-pwa, or am i missing something in the manifest / SW file ?

thanks

@userquin
Copy link
Member

Try adding ignoreURLParametersMatching: [/.*/], in workbox pwa option, if your're using custom service worker use:

precacheAndRoute(self.__WB_MANIFEST, { ignoreURLParametersMatching: [/.*/] })

https://developer.chrome.com/docs/workbox/modules/workbox-precaching

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants