-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Web] Don't force-reload the Service Worker (#561)
Removes the entire concept of detecting the service worker version and enforcing an update on mismatch. Auto-reloading the service worker when it's updated thrashes any `postMessage` communication that's in progress at the moment of calling `skipWaiting()`. This causes Playground to hang at the "login" step in WordPress/wordpress-playground#559. However, the browsers handle a lot by default: * `registration.update()` method downloads the new service-worker.js file and compares it byte-by-byte with the existing one * The previous service worker won't die until all the browser tabs it serves are closed * The new service worker will automatically replace the previous one afterwards The only problem remains deploying a website that is backwards–incompatible with the previous service worker. This is tracked separately in WordPress/wordpress-playground#566 Co-authored-by: Dennis Snell <dennis.snell@automattic.com>
- Loading branch information
Showing
5 changed files
with
29 additions
and
136 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
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
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