20e1cc049f
Currently the Service Worker checks for updates only on SW startup, an event which happens frequently but also nondeterministically. This makes it hard for developers to observe the update process or reason about how updates will be delivered to users. This problem is exacerbated by the DevTools behavior of keeping the SW alive indefinitely while opened, effectively preventing the page from updating at all. This change causes the SW to additionally check for updates on navigation requests (app page reloads). This creates deterministic update behavior, and is much easier for developers to reason about. It does leave the old update-on-SW-startup behavior in place, as removing that would be a breaking change. Fixes #20877 |
||
---|---|---|
.. | ||
src | ||
test | ||
testing | ||
BUILD.bazel | ||
main.ts | ||
rollup-worker.config.js | ||
tsconfig.json |