Skip to content

Commit 1065777

Browse files
committed
preconnect
1 parent 2c08515 commit 1065777

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

fetch.bs

+31
Original file line numberDiff line numberDiff line change
@@ -2909,6 +2909,37 @@ reused across <a>connections</a> whose <a for=connection>credentials</a> are fal
29092909
<a>connections</a> whose <a for=connection>credentials</a> are true.
29102910
</div>
29112911

2912+
<div algorithm="preemmptively-obtain-a-connection">
2913+
<p>To <dfn export>preemptively obtain a connection</dfn>, given an
2914+
<a>environment settings object</a> <var>environment</var>, a <a for=/>URL</a> <var>url</var>, and a
2915+
boolean <var>credentials</var>, run these steps:
2916+
2917+
<ol>
2918+
<li><p>Let <var>key</var> be the result of <a for=/>determining the network partition key</a> given
2919+
<var>environment</var>.
2920+
2921+
<li><p><a>Check resource hint CSP</a> with <var>environment</var> and <var>url</var>. If that
2922+
returns <b>allowed</b>, <a>Obtain a connection</a> with <var>key</var>, <var>url</var> and
2923+
<var>credentials</var>.
2924+
</ol>
2925+
</div>
2926+
2927+
<div algorithm="check-resource-hint-csp">
2928+
<p>To <dfn export>Check resource hint CSP</dfn>, given an
2929+
<a>environment settings object</a> <var>environment</var>, and a <a for=/>URL</a> <var>url</var>,
2930+
run these steps:
2931+
2932+
<ol>
2933+
<li><p>Let <var>request</var> be a <a for=/>request</a> whose <a for=request>URL</a> is
2934+
<var>url</var>, <a for=request>initiator</a> is "<code>prefetch</code>", and whose
2935+
<a for=request>client</a> is <var>environment</var>.
2936+
2937+
<li><p>Return the result of running <a>should request be blocked by Content Security Policy?</a>
2938+
given <var>request</var>.
2939+
2940+
</ol>
2941+
</div>
2942+
29122943
<hr>
29132944

29142945
<div algorithm>

0 commit comments

Comments
 (0)