Re: [whatwg/fetch] Send `Sec-Purpose: prefetch` header for prefetch requests (PR #1576)

@domenic commented on this pull request.



> @@ -5313,6 +5335,10 @@ run these steps:
    <li><p><a abstract-op lt="append the Fetch metadata headers for a request">Append the Fetch metadata headers for <var>httpRequest</var></a>.
    [[!FETCH-METADATA]]
 
+   <li><p>If <var>httpRequest</var>'s <a for=request>initiator</a> is "<code>prefetch</code>", then
+   <a>set a structured field value</a> given (`<a http-header><code>Sec-Purpose</code></a>`,
+   "<code>prefetch</code>") in <var>httpRequest</var>'s <a for=request>header list</a>.

I would do

> the token `prefetch`

I think it's confusing to have both "token" as the marker (indicating a token), and the quotation marks as the marker (indicating a string).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1576#discussion_r1070771092
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1576/review/1249467514@github.com>

Received on Monday, 16 January 2023 02:44:53 UTC