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
Defer new SW registration from a prerendered page until it's activated #131
Conversation
@nhiroki What do you think of this PR? |
Hmm I guess this makes less sense for the omnibox case, where the SW would usually be brand new. maybe it's better to just defer registration instead. |
Refactored to defer instead of discard. This is better for the user-agent initiated prerendering case, where otherwise any page with SW would not work. |
LGTM. Deferring service worker registration sounds good to me. |
Great! I think the way this PR works needs more baking, but I'll follow that path and also create the appropriate WPTs. |
@domenic, WDYT? |
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.
LGTM with nit but I will continue discussion in the issue.
Co-authored-by: Domenic Denicola <d@domenic.me>
Can someone please merge? |
LGTM, but I don't have permission to merge. |
@jeremyroman Would you merge this PR? |
This prevents nonsensical behavior such as a prerendering context creating a service-worker that can create notifications or cache in a way that affects non-prerendering contexts.
An attempt at #44