Do not keep service workers alive via prefetch clients#409
Do not keep service workers alive via prefetch clients#409
Conversation
| Preview: |
|
Given that #347 (comment) #347 (comment), I feel I'm not yet fully confident that this is implementable right now so prefer to keep this unresolved (until we get bandwidth/priority to investigate/implement this). Also @yoshisatoyanagisawa, WDYT? |
|
For the implementation wise, it might be similar position with BFCache. Trade-offs between correctness and performance might also be the same with it. |
Fixes #347: the "clients" created during prefetch time no longer count as controlling pages, in a way that prevents service worker updates. We may still want to consider evicting prefetch records on service worker updates (as discussed in #351), but that can be done as an additional step on top of this.
22e0a3d to
ef675ce
Compare
|
I've pushed a second commit that clears existing prefetch records on update, to implement (C) of #347 (comment) per @yoshisatoyanagisawa's recommendation in #347 (comment). I am not sure I understood the best place in the service worker spec to insert that step, so careful review is appreciated! |
Fixes #347: the "clients" created during prefetch time no longer count as controlling pages, in a way that prevents service worker updates. We may still want to consider evicting prefetch records on service worker updates (as discussed in #351), but that can be done as an additional step on top of this.