Repository navigation
Ff115 Sec-Purpose HTTP header plus some related changes in HTML - #27499
Conversation
|
Preview URLs
Flaws (5)Note! 1 document with no flaws that don't need to be listed. 🎉 URL:
URL:
URL:
External URLs (1)URL:
(comment last updated: 2023-06-27 04:30:58) |
| - : Indicates the request's destination. | ||
| It is a Structured Header whose value is a token with possible values `audio`, `audioworklet`, `document`, `embed`, `empty`, `font`, `image`, `manifest`, `object`, `paintworklet`, `report`, `script`, `serviceworker`, `sharedworker`, `style`, `track`, `video`, `worker`, and `xslt`. | ||
|
|
||
| The following request headers are not _strictly_ "fetch metadata request headers", but similarly provide information about the context of how a resource will be used. |
There was a problem hiding this comment.
I am not sure whether or not I can characterize these two as Fetch metadata request headers. They are in a different spec https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header vs the fetch spec. However they serve a similar purpose, which is to tell the server some context about the way the resource will be used, so it can configure itself appropriately.
I have put them as part of the metadata headers here (and in the glossary) and in the glossary stated that they are in different specs. Is this OK?
|
|
||
| - `as` | ||
|
|
||
| - : This attribute is only used when `rel="preload"` or `rel="prefetch"` has been set on the `<link>` element. |
There was a problem hiding this comment.
FYI This is a complication that we will need to workaround. The spec only allows as in preload. However chrome allows it to specify document and has some off spec special handling. I have matched the spec here, but will need to add a BCD entry for as is ignored in link with rel="prefetch"
| > **Note:** At time of writing FireFox incorrectly sets the `Accept` header as `Accept: */*` for this case. | ||
| > This issue can be tracked in [Firefox bug 1836334](https://bugzil.la/1836334). |
There was a problem hiding this comment.
I'd prefer not to note this but I had to fake the example since nothing is compliant (only FF115 implements the header). I figure this makes it easy to regenerate the proper example once something is compliant.
There was a problem hiding this comment.
Note that the info about Accept is recorded in BCD as a note for Sec-Purpose.
bd14b0a to
aa2ba62
Compare
FF115 adds support for the
Sec-PurposeHTTP header, replacingX-moz: prefetchin https://bugzilla.mozilla.org/show_bug.cgi?id=1836328. It is currently only supported by FF115, though Chrome usesPurposefor same reason. It has one directiveprefetchwhich tells a server this is a prefetch originating from a<link>element withrel="prefetch"The bigger picture of these docs is complicated because while prefetch has been supported forever, it has been done with different headers everywhere. The spec has now stablised and browsers are intending to move there, but none are. FF is closest.
The small picture is complicated because this header affects other header usage. And there is no really good place to include that info. See notes inline
Other docs work can be tracked in #27171