How can you force a PWA to ignore its service worker entirely?

Viewed 17

I have a PWA that's deployed in production. However occasionally, I want to immediately invalidate the user's currently cached PWA and force them to redownload the app as if it were a regular web-page.

A good example of why is that last week I had a surge of signups, all of whom now have a cached version of my app that didn't, at that time, have a signup flow. I've now pushed the signup flow but when I link the users to it, they get a page-not-found error because the cached version of PWA they have refers to the old one.

This is an Angular PWA and I would like to build something into it that, when needed, allows me to force the app to bypass the service worker entirely and just reload from the server.

Ideally this would be something I'd implement via a url parameter e.g. myapp.com/?pwa-reload=true

I know I can force the app to do a check on first-load but I really want to just force it to behave like a normal app. Can I do that?

0 Answers
Related