@@ -18,6 +18,8 @@ urlPrefix:https://httpwg.org/specs/rfc8941.html#;type:dfn;spec:rfc8941
18
18
url:rfc.section.2;text:structured field value
19
19
url:text-serialize;text:serializing structured fields
20
20
url:text-parse;text:parsing structured fields
21
+ url:;text:structured header
22
+ url:token;text:structured field token
21
23
22
24
urlPrefix:https://httpwg.org/specs/rfc9110.html#;type:dfn;spec:http
23
25
url:method.overview;text:method
@@ -4088,6 +4090,22 @@ run these steps:
4088
4090
</div>
4089
4091
4090
4092
4093
+ <h3 id="sec-purpose-header">`<code>Sec-Purpose</code>` header</h3>
4094
+
4095
+ <p> The `<dfn export http-header id=http-sec-purpose><code>Sec-Purpose</code></dfn> ` HTTP request
4096
+ header specifies that the request serves one or more purposes other than requesting the resource for
4097
+ immediate use by the user.
4098
+
4099
+ <p> The `<a http-header><code>Sec-Purpose</code></a> ` header field is a <a>structured header</a>
4100
+ whose value must be a <a data-lt="structured field token">token</a> .
4101
+
4102
+ <p> The sole <a data-lt="structured field token">token</a> defined is <code> prefetch</code> . It
4103
+ indicates the request’s purpose is to fetch a resource that is anticipated to be needed shortly.
4104
+
4105
+ <p class=note> The server can use this to adjust the caching expiry for prefetches, to disallow the
4106
+ prefetch, or to treat it differently when counting page visits.
4107
+
4108
+
4091
4109
4092
4110
<h2 id=fetching>Fetching</h2>
4093
4111
@@ -5327,6 +5345,11 @@ run these steps:
5327
5345
<li><p> <a abstract-op lt="append the Fetch metadata headers for a request">Append the Fetch metadata headers for <var>httpRequest</var></a> .
5328
5346
[[!FETCH-METADATA]]
5329
5347
5348
+ <li><p> If <var> httpRequest</var> 's <a for=request>initiator</a> is "<code> prefetch</code> ", then
5349
+ <a>set a structured field value</a> given (`<a http-header><code>Sec-Purpose</code></a> `,
5350
+ the <a data-lt="structured field token">token</a> <code> prefetch</code> ) in
5351
+ <var> httpRequest</var> 's <a for=request>header list</a> .
5352
+
5330
5353
<li><p> If <var> httpRequest</var> 's <a for=request>header list</a>
5331
5354
<a for="header list">does not contain</a> `<code> User-Agent</code> `, then user agents should
5332
5355
<a for="header list">append</a> (`<code> User-Agent</code> `,
0 commit comments