You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h3 id="serviceworker-link-header">Declaring a "serviceworker" <code>Link</code> header</h3>
1769
1769
1770
-
A <a>serviceworker link</a> can be declared using a `Link` header</a>[[!RFC5988]] with "`serviceworker`" as the value of the "`rel`" parameter and a [=URL serializer|serialized=][=service worker/script url=] inside angle brackets ("`<>`") as the <a>target IRI</a>, and the following optional <a>target attributes</a>:
1770
+
A <a>serviceworker link</a> can be declared using a `Link` header</a>[[!RFC8288]] with "`serviceworker`" as the value of the "`rel`" parameter and a [=URL serializer|serialized=][=service worker/script url=] inside angle brackets ("`<>`") as the [=link target=], and the following optional [=target attributes=]:
1771
1771
1772
1772
: `scope`
1773
1773
:: Value: A [=URL serializer|serialized=][=service worker registration/scope url=].
<h3 id="link-header-processing">Processing a "serviceworker" <code>Link</code> header</h3>
1793
1793
1794
-
When a user agent that supports [[!RFC5988]] processes a <code>Link</code> header that contains a <a>serviceworker link</a>, the user agent *should* run these steps:
1794
+
When a user agent that supports [[!RFC8288]] processes a <code>Link</code> header that contains a <a>serviceworker link</a>, the user agent *should* run these steps:
1795
1795
1796
1796
1. If the <code>Link</code> header has an "<code>anchor</code>" parameter, abort these steps.
1797
-
1. Let |contextURL| be the result of <a lt="URL parser">parsing</a> the <a>context IRI</a> of the <code>Link</code> header.
1797
+
1. Let |contextURL| be the result of <a lt="URL parser">parsing</a> the [=link context=] of the <code>Link</code> header.
1798
1798
1. If the result of running <a>potentially trustworthy origin</a> with the [=environment settings object/origin=] of |contextURL| is <code>Not Trusted</code>, abort these steps.
1799
1799
1. Let |request| be the [=/request=] for which this header was received in the response.
1800
1800
1. If |request|'s [=request/client=] is not a <a>secure context</a>, abort these steps.
1801
-
1. Let |scriptURL| be the result of <a lt="URL parser">parsing</a> the <a>target IRI</a> of the <code>Link</code> header.
1801
+
1. Let |scriptURL| be the result of <a lt="URL parser">parsing</a> the [=link target=] of the <code>Link</code> header.
1802
1802
1. Let |scopeURL| be null.
1803
-
1. If the "<code>scope</code>" <a>target attribute</a> of the <code>Link</code> header is present, set |scopeURL| to the result of <a lt="URL parser">parsing</a> the "<code>scope</code>" <a>target attribute</a> with |scriptURL|.
1804
-
1. Let |workerType| be the "<code>workertype</code>" <a>target attribute</a> of the <code>Link</code> header, or "<code>classic</code>" if no such attribute is present.
1803
+
1. If the "<code>scope</code>" [=target attribute=] of the <code>Link</code> header is present, set |scopeURL| to the result of <a lt="URL parser">parsing</a> the "<code>scope</code>" [=target attribute=] with |scriptURL|.
1804
+
1. Let |workerType| be the "<code>workertype</code>" [=target attribute=] of the <code>Link</code> header, or "<code>classic</code>" if no such attribute is present.
1805
1805
1. If |workerType| is not a valid {{WorkerType}} value, abort these steps.
1806
1806
1. Let |updateViaCache| be the "`updateviacache`" [=target attribute=] of the `Link` header, or "`imports`" if no such attribute is present.
1807
1807
1. Invoke [=Start Register=] with |scopeURL|, |scriptURL|, a new <a>promise</a>, null, |contextURL|, |workerType|, and |updateViaCache|.
0 commit comments