From 49b3a21d725c734ff81bc10d9a8623a3813a4631 Mon Sep 17 00:00:00 2001
From: Noam Rosenthal
The prefetch
keyword indicates that preemptively fetching and caching the specified resource is likely to be
- beneficial, as it is highly likely that the user will require this resource for future
- navigations. User agents must implement the processing model of the prefetch
keyword described in Resource Hints.
-
There is no default type for resources given by the prefetch
keyword.
The fetch and process the linked resource algorithm for prefetch
links, given a link
element
+ el, is as follows:
If el's href
attribute's value is the
+ empty string, then return.
Let options be the result of creating link options from el.
Let request be the result of creating a + link request given options.
Set request's destination
+ to "prefetch
".
Set request's initiator
+ to "prefetch
".
Set request's header list to « (`Sec-Purpose
`, `Prefetch
) ».
The user agent should fetch request. User + agents may delay the fetching of request to prioritize othere requests that are + necessary for the current document.
The process a link header steps for this type of linked resource are to do + nothing.
+preload
"The following terms are defined in MIME Sniffing:
@@ -26069,6 +26071,8 @@ document.body.appendChild(wbr);Let request be the result of creating a link request given options.
If request is null, return.
Set request's destination
to "prefetch
".
Set request's header list to « (`Sec-Purpose
`, `Prefetch
) ».
prefetch
`) ».
The user agent should fetch request. User - agents may delay the fetching of request to prioritize othere requests that are + agents may delay the fetching of request to prioritize other requests that are necessary for the current document.
The `Sec-Purpose
` HTTP request header indicates to
+ the server that the resource is to be used in the future rather than immediately.
+
+
The `Sec-Purpose
` header field is a structured header whose value must be a list, which may contain an item whose the token `prefetch
`. Its ABNF is:
Sec-Prefetch = sf-list
+
The process a link header steps for this type of linked resource are to do nothing.
From 4da1e872bb3f4bb3b6e15b29fe48e6d2174f672d Mon Sep 17 00:00:00 2001 From: Noam RosenthalSec-Purpose
`, `prefetch
`) ».
- The user agent should fetch request. User - agents may delay the fetching of request to prioritize other requests that are - necessary for the current document.
Let processPrefetchResponse be the following steps given a response response and null, failure, or a + byte sequence bytesOrNull:
+ +If response is null or failure, or if response has a
+ non-ok status, fire an event named error
at el.
Otherwise, fire an event named load
at el.
The user agent should fetch request, with + processResponseConsumeBody set to + processPrefetchResponse. User agents may delay the fetching of request to + prioritize other requests that are necessary for the current document.
The ` Let options be the result of creating link options from el. Set request's destination to
+ " Let request be the result of creating a
link request given options. If request is null, return. Set request's destination
- to " Set request's initiator
to " Set request's header list to « (`Sec-Purpose
` HTTP request header indicates to
From 9c109a5d826b1c4b56412b6b047428bd1d2d627d Mon Sep 17 00:00:00 2001
From: Noam Rosenthal prefetch
".prefetch
".prefetch
".Sec-Purpose
`, `prefetch
`) ».Sec-Purpose
`, `prefetch
`) ».
Let processPrefetchResponse be the following steps given a prioritize other requests that are necessary for the current document.
The process a link header steps for this type of linked resource are to do + nothing.
+ +The `Sec-Purpose
` HTTP request header indicates to
- the server that the resource is to be used in the future rather than immediately.
+ the server that the resource is to be used in the future rather than immediately.
The ` The process a link header steps for this type of linked resource are to do
- nothing. Let options be the result of creating link options from el. Set request's destination to
+ Set options's destination to
" Let request be the result of creating a
From 7b3c15a6e19db5e385b22a10c83661d502b41e56 Mon Sep 17 00:00:00 2001
From: Noam Rosenthal Set options's destination to
- "Sec-Purpose
` header field is a structured header whose value must be a
- Sec-Prefetch = sf-list
Link type "
From 0b4bec48ce078cf0147b5f44b177ce80b4251558 Mon Sep 17 00:00:00 2001
From: Noam Rosenthal preload
"prefetch
".prefetch
".
Let request be the result of creating a link request given options.
Set request's initiator to
+ "prefetch
"..
If request is null, return.
Set request's initiator
From 69771544b54c0bc0d0ef94b717b643227f47b3e1 Mon Sep 17 00:00:00 2001
From: Noam Rosenthal
Set request's initiator to
- "prefetch
"..
prefetch
".
If request is null, return.
Set request's initiator
to "prefetch
".
Set request's header list to « (`Sec-Purpose
`, `prefetch
`) ».
Let processPrefetchResponse be the following steps given a response response and null, failure, or a
From f57fe195af1c018609e33dfcd2dae69ff0c73ede Mon Sep 17 00:00:00 2001
From: Noam Rosenthal
Set options's destination to - the empty string.
Let request be the result of creating a link request given options.
The `Sec-Purpose
` HTTP request header indicates to
- the server that the resource is to be used in the future rather than immediately.
The `Sec-Purpose
` header field is a structured header whose value must be a list, which may contain an item whose the token `prefetch
`. Its ABNF is:
Sec-Prefetch = sf-list
-
preload
"If response is null or failure, or if response has a
- non-ok status, fire an event named If response is a network error, fire an event named error
at el.
Otherwise, fire an event named
Date: Tue, 17 Jan 2023 17:10:00 +0900
Subject: [PATCH 10/10] Small fixes
---
source | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/source b/source
index 1254b92299b..e26ccf4ee4e 100644
--- a/source
+++ b/source
@@ -2490,8 +2490,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
Let request be the result of creating a link request given options.
If request is null, then return.
Set request's initiator to
"prefetch
".
If request is null, return.
Set request's initiator
- to "prefetch
".
Let processPrefetchResponse be the following steps given a response response and null, failure, or a @@ -26095,7 +26090,6 @@ document.body.appendChild(wbr);
Otherwise, fire an event named load
at el.
The user agent should fetch request, with @@ -26107,8 +26101,6 @@ document.body.appendChild(wbr);
The process a link header steps for this type of linked resource are to do nothing.
-preload
"