-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(service-worker): do not unassign clients from a broken version (#…
…43518) Previously, when a version was found to be broken, any clients assigned to that version were unassigned (and either assigned to the latest version or to none if the latest version was the broken one). A version could be considered broken for several reasons, but most often it is a response for a hashed asset that eiher does not exist or contains different content than the SW expects. See #28114 (comment) for more details. However, assigning a client to a different version (or the network) in the middle of a session, turned out to be more risky than keeping it on the same version. For angular.io, for example, it has led to #28114. This commit avoids making things worse when identifying a broken version by keeping existing clients to their assigned version (but ensuring that no new clients are assigned to the broken version). NOTE: Reloading the page generates a new client ID, so it is like a new client for the SW, even if the tab and URL are the same. PR Close #43518
- Loading branch information
Showing
2 changed files
with
79 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters