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

How to remove a Service Worker installed before redirection #676

Open
nowhhk opened this issue Mar 2, 2024 · 0 comments
Open

How to remove a Service Worker installed before redirection #676

nowhhk opened this issue Mar 2, 2024 · 0 comments

Comments

@nowhhk
Copy link

nowhhk commented Mar 2, 2024

I installed vite-pwa/nuxt in my nuxt3 project, I kept getting users with old caches from service worker.

  1. ServiceWorker was installed on 'example.com'.
  2. the main domain was changed to 'www.example.com', and accessing 'example.com' should be redirected to 'www.example.com'.
  3. since then, our site has uninstalled the service worker by adding the "selfDestroying:true" option in the config.
  4. however, when some users enter 'example.com', they see a site with an old version of the cache left over from the service worker. Also, they are not redirected to 'www.example.com'.
    (No problem when accessing 'www.example.com')

Is there a solution to fix this?

@nowhhk nowhhk changed the title How to completely delete old service workers and cache from a user's browser? How to remove a Service Worker installed before redirection Mar 3, 2024
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

1 participant