From a5560d2847f6c9cacc0c609768506878ae119e96 Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Tue, 17 Jan 2023 12:03:36 +0200 Subject: [PATCH] Accept header for prefetch Complements https://github.com/whatwg/html/pull/8111. Co-authored-by: Anne van Kesteren --- fetch.bs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fetch.bs b/fetch.bs index fb10efa8c..7e24ae7c3 100644 --- a/fetch.bs +++ b/fetch.bs @@ -1321,6 +1321,9 @@ downloads. This format of range header value can be set using add a range hea implementation-defined header value for the `User-Agent` header. +

The document `Accept` header value is +`text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8`. +

Statuses

@@ -4274,16 +4277,19 @@ the response. [[!HTTP-CACHING]]
  1. Let value be `*/*`. +

  2. If request's initiator is "prefetch", then set + value to the document `Accept` header value. +

  3. -

    A user agent should set value to the first matching statement, if any, switching - on request's destination: +

    Otherwise, the user agent should set value to the first matching statement, if + any, switching on request's destination:

    "document"
    "frame"
    "iframe" -
    `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8` +
    the document `Accept` header value
    "image"
    `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5`