Skip to content

Commit 16c7464

Browse files
authoredMar 16, 2023
Define the processing model for dns-prefetch
Note that this still doesn't include the CSP bits, which are also not implemented anywhere for this & preconnect. That's tracked by #9035. Closes #9015.
1 parent dc81ba3 commit 16c7464

File tree

1 file changed

+38
-3
lines changed

1 file changed

+38
-3
lines changed
 

‎source

+38-3
Original file line numberDiff line numberDiff line change
@@ -2577,6 +2577,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
25772577
<li><dfn data-x-href="https://fetch.spec.whatwg.org/#determine-the-network-partition-key">determine the network partition key</dfn></li>
25782578
<li><dfn data-x-href="https://fetch.spec.whatwg.org/#extract-full-timing-info">extract full timing info</dfn></li>
25792579
<li><dfn data-x-href="https://fetch.spec.whatwg.org/#byte-sequence-as-a-body">as a body</dfn></li>
2580+
<li><dfn data-x-href="https://fetch.spec.whatwg.org/#resolve-an-origin">resolve an origin</dfn></li>
25802581
<li>
25812582
<dfn data-x="concept-response"
25822583
data-x-href="https://fetch.spec.whatwg.org/#concept-response">response</dfn> and its
@@ -25763,9 +25764,43 @@ document.body.appendChild(wbr);</code></pre>
2576325764
<p>There is no default type for resources given by the <code
2576425765
data-x="rel-dns-prefetch">dns-prefetch</code> keyword.</p>
2576525766

25766-
<p class="XXX">The processing model for <code data-x="rel-dns-prefetch">dns-prefetch</code> needs
25767-
to be properly specified. Tracked in <a
25768-
href="https://github.com/whatwg/html/issues/9015">issue #9015</a>.</p>
25767+
<p>The appropriate times to <span data-x="fetch and process the linked resource">fetch and
25768+
process</span> this type of link are:</p>
25769+
25770+
<ul>
25771+
<li><p>When the <span>external resource link</span> is created on a <code>link</code> element
25772+
that is already <span>browsing-context connected</span>.</p></li>
25773+
<!-- e.g. rel="" changed, href="" set... -->
25774+
25775+
<li><p>When the <span>external resource link</span>'s <code>link</code> element <span>becomes
25776+
browsing-context connected</span>.</p></li>
25777+
25778+
<li><p>When the <code data-x="attr-link-href">href</code> attribute of the <code>link</code>
25779+
element of an <span>external resource link</span> that is already <span>browsing-context
25780+
connected</span> is changed.</p></li>
25781+
</ul>
25782+
25783+
<p>The <span>fetch and process the linked resource</span> steps for this type of linked resource,
25784+
given a <code>link</code> element <var>el</var>, are:
25785+
25786+
<ol>
25787+
<li><p><span data-x="parse a URL">Parse</span> <var>el</var>'s
25788+
<code data-x="attr-link-href">href</code> attribute relative to <var>el</var>'s
25789+
<span>node document</span> and let <var>url</var> be the <span>resulting URL record</span>. If
25790+
this fails, return.</p></li>
25791+
25792+
<li><p>Let <var>partitionKey</var> be the result of <span data-x="determine the network
25793+
partition key">determining the network partition key</span> given <var>el</var>'s
25794+
<span>node document</span>'s <span>relevant settings object</span>.</p></li>
25795+
25796+
<li>
25797+
<p>The user agent should <span>resolve an origin</span> given <var>partitionKey</var> and
25798+
<var>url</var>'s <span data-x="concept-url-origin">origin</span>.</p>
25799+
25800+
<p class="note">As the results of this algorithm can be cached, future fetches could be
25801+
faster.</p>
25802+
</li>
25803+
</ol>
2576925804

2577025805

2577125806
<h5>Link type "<dfn attr-value for="a/rel,area/rel,form/rel"><code

0 commit comments

Comments
 (0)
Please sign in to comment.