Re: [w3c/ServiceWorker] _Update algorithm should unregister SW on 404 and 410 errors (#204)

> I'm all for unregistering the service worker to avoid issues I've encountered in [Create React App](https://github.com/facebookincubator/create-react-app).
> 
> Beyond localhost issues described by @jeffposnick. What if I create an app that has a service-worker.js, deploy it on `something.com`. Then later on I released a new app without service workers on `something.com`
> 
> As it stands my new app, even though it has never touched a service worker would have to have something to deregister old service workers, or else every user would always see the old version of the app.
> 
> If the server responds with a `404` that is quite an obvious error of not finding a file and I have never encountered a server responding with `404` when it was actually a `500` error (but yes, it could happen under certain edge-case circumstances).
> 
> Even if it does, worst case someone loses access to the site temporarily (no more offline after 1st reload). On the other hand, worst case of ignoring 404 is someone is stuck forever seeing the incorrect webapp.

I can't agree more, this is likely to cause serious problems in the future. I don't think the fact that Google and Facebook don't want this is a solid argument.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/204#issuecomment-547982280

Received on Wednesday, 30 October 2019 16:05:03 UTC