Skip to content

Commit 22e0a3d

Browse files
committed
Do not keep service workers alive via prefetch clients
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.
1 parent 49f77f3 commit 22e0a3d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

prefetch.bs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,16 @@ This section contains patches to [[NAVIGATION-TIMING]].
779779

780780
This section contains patches to [[SERVICE-WORKERS]].
781781

782+
<div algorithm="Service worker control">
783+
Modify the definition of <a spec="SERVICE-WORKERS">controlled</a> as follows:
784+
785+
<blockquote>
786+
When a [=service worker client=] has a non-null [=environment/active service worker=]<ins> whose [=environment/is navigational prefetch client=] is false</ins>, it is said to be <dfn noexport>controlled</dfn> by that [=environment/active service worker=].
787+
</blockquote>
788+
</div>
789+
790+
<hr>
791+
782792
<div algorithm="Create Fetch Event and Dispatch">
783793
Modify <a spec="SERVICE-WORKERS">Create Fetch Event and Dispatch</a>'s step which sets {{FetchEvent/resultingClientId}} as follows:
784794

0 commit comments

Comments
 (0)