0

Im a little bit confused. So i've read How do I uninstall a Service Worker? topic and it is pretty common when you need to remove SW (service worker) when you have access to dev console from any PC/Mac. But yesterday i've faced something new. It is related to mobile browsers only. No matter safari, chrome, ff, problem is for everyone, who visited before and once loaded SW in the past.

We have used SW to allow users install our web app as PWA and everything was cool until we released new major version. Now when any of our users trying to use our website then they get outdated version of app. Nothing works, obviosly, and i cant even send any update to their devices.

I've tried:

  1. To turn off nginx completely. Anyway, my mobile browser still getting OLD version and doesnt react for any new files. Its just stopped to load images across app, but everything remains the same. I guess it is because index.html is heavy cached somewhere in the browser. And furthermore, i can't say to ~10000 everyday visitors to clear out their data in browser and i dont want to either.

  2. To modify index.html/any js chunked file. No updates. Still old version.

  3. To eval js in address bar and clear worker by the href. Nope.

  4. Update certs. I thought maybe new certificates will force webworker to do something, buuut nope.

  5. Remove webservices from that domain and just proxy em to another webserver. Nothing.

  6. Turning off backend server. Nothing. index.html remains always the same. It cant reach api and falls to an error, but everything remains outdated.

If i do open in private tab - everything is perfect. But, again, how to deal with another 9999 users? I cant update website for them and provide any details in THEIR cached version.

I see only one solution - to change subdomain. It will be painfull step but i dont see any another option to reset SW.

Have somebody faced the same issues and maybe figured out how to deal with that? Because im giving up and seems will turn SW forever offline.

SW was taken from Create-react-app without changes as it provided in bundle by default.

LizardDog
  • 43
  • 5

0 Answers0