Repository navigation
Send Sec-Purpose: prefetch header for prefetch requests - #1576
Conversation
Sec-Purpose: prefetch header for prefetch requests
|
If this lands, please don't forget to register the header. |
|
That's a good point. Let's define this header then in its own section in HTTP extensions? Also, we should probably define it as a structured header given that its new and use https://fetch.spec.whatwg.org/#concept-header-list-set-structured-header to set it. |
Done, hope this is right :) |
The purpose headers allows servers to discern between regular requests and "resource hints" - requests that are only meant to populate caches. This replaces the existing `Purpose` and `x-moz: prefetch` headers. Closes w3c/webappsec-fetch-metadata#84 Part of whatwg/html#8111
|
@annevk all the checkboxes for this and for whatwg/html#8111 are ticked! Anything missing? |
Prefetch is simply a fetch, which populates the HTTP cache, with no post-processing of the resource and with a special header Sec-Purpose: prefetch. (The latter is specified in whatwg/fetch#1576.) Closes #5229. Closes w3c/resource-hints#86. Closes w3c/resource-hints#74. Closes whatwg/fetch#1008.
|
Header registration: protocol-registries/http-fields#37. |
|
The WebKit bug link looks incorrect; did you intend to link a different bug? |
|
@jeremyroman thank you, I found a more suitable reference. |
Send
Sec-Purpose: prefetchfor prefetch requestsThe purpose headers allows servers to discern between regular requests
and "resource hints" - requests that are only meant to populate
caches.
This replaces the existing
Purposeandx-moz: prefetchheaders.Closes w3c/webappsec-fetch-metadata#84
Closes w3c/resource-hints#74
Part of whatwg/html#8111
At least two implementers are interested (and none opposed):
Tests are written and can be reviewed and commented upon at:
Implementation bugs are filed:
1358419:
Sec-Purposeheader1788167: Align prefetch with spec
MDN issue is filed: Update
prefetchlink once the spec and implementations are finalized mdn/content#23553(See WHATWG Working Mode: Changes for more details.)
Preview | Diff