Repository navigation
Check the service worker for a change on every install - #17
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #17 +/- ##
=======================================
Coverage 92.16% 92.17%
=======================================
Files 33 33
Lines 2910 2912 +2
Branches 39 39
=======================================
+ Hits 2682 2684 +2
Misses 201 201
Partials 27 27 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



A browser checks a registered service worker for a new script when it navigates to a page inside the worker's scope, and the Service Worker spec's Register runs no check when the script URL is unchanged. The static worker that
dxbundles lives under/assets/since #11, and the Rust-handler worker from #3 and #15 has the same kind of scope, so an app's own pages never trigger that check. A changedpushups-sw.jsor app build then waits for a soft update, which comes after a push once 24 hours have passed. Both Safaris kept the old worker until the page asked forregistration.update().installnow waits for the registration and asks it for that update once per page load. A failed check leaves the browser's current worker in place. The README's web section says so.The web harness gains an
updatedscenario, which serves the worker from/scoped/so the page at/is outside its scope and changes the worker's bytes between two page loads. Before the change the second page still talked to the first worker until the 30 second bound ran out, and after it the new worker answers in Chrome and Firefox. Every other scenario still passes in both browsers.