Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define Sec-Purpose: Prefetch #84

Closed
noamr opened this issue Nov 30, 2022 · 0 comments · Fixed by whatwg/fetch#1576
Closed

Define Sec-Purpose: Prefetch #84

noamr opened this issue Nov 30, 2022 · 0 comments · Fixed by whatwg/fetch#1576

Comments

@noamr
Copy link

noamr commented Nov 30, 2022

See whatwg/html#8111

Sec-Purpose: Prefetch is sent when the document fetches a <link rel=prefetch> resource.
It allows servers to do the following:

  • opt-out from prefetching, e.g. by sending a 503 response with Cache-Control: no-store
  • Some pages that rely on requests for analytics and for information such as "last visited". This allows them to not count the prefetch as an actual visit to the site.
noamr added a commit to noamr/webappsec-fetch-metadata that referenced this issue Dec 19, 2022
This hopefully replaces `x-moz: Prefetch`
and `Purpose: Prefetch` with something
agreed.

It applies both to [link prefetch](https://html.spec.whatwg.org/multipage/links.html#link-type-prefetch)
and to [speculation rules prefetch](https://wicg.github.io/nav-speculation/prefetch.html#prefetch),
though the latter may require additional parameters.

See whatwg/html#8111
Closes w3c#84
noamr added a commit to noamr/fetch that referenced this issue Dec 19, 2022
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
noamr added a commit to noamr/fetch that referenced this issue Dec 19, 2022
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
noamr added a commit to noamr/fetch that referenced this issue Jan 4, 2023
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
noamr added a commit to noamr/fetch that referenced this issue Jan 11, 2023
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 added a commit to whatwg/fetch that referenced this issue Jan 17, 2023
This replaces the existing `Purpose: prefetch` and `x-moz: prefetch` headers.

Tests: web-platform-tests/wpt#35707.

Part of whatwg/html#8111.

Closes w3c/webappsec-fetch-metadata#84 and w3c/resource-hints#74.

Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant