New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(service-worker): clean up caches from old SW versions #26319
Conversation
Since the SW immediately takes over all clients, it is safe to delete caches used by older (e.g. beta) `@angular/service-worker` versions to avoid running into browser storage quota limitations.
You can preview 1a42c3f at https://pr26319-1a42c3f.ngbuilds.io/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! thanks
caretaker notes: ci flakes |
Since the SW immediately takes over all clients, it is safe to delete caches used by older (e.g. beta) `@angular/service-worker` versions to avoid running into browser storage quota limitations. PR Close #26319
) Since the SW immediately takes over all clients, it is safe to delete caches used by older (e.g. beta) `@angular/service-worker` versions to avoid running into browser storage quota limitations. PR Close angular#26319
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
Docs have been added / updated (for bug fixes / features)PR Type
What is the current behavior?
Installing a recent version of
@angular/service-worker
, leaves caches created by an old version (e.g. beta) behind. This can lead to exceeding the storage quota limitations imposed by browsers.Issue Number: N/A
What is the new behavior?
On
activate
, the SW will schedule the removal of caches left behind by older versions. Since the SW immediately takes over all clients, it is safe to delete caches used by older (e.g. beta)@angular/service-worker
versions to avoid running into browser storage quota limitations.Does this PR introduce a breaking change?