diff --git a/index.html b/index.html index a290cbb..7b1421e 100644 --- a/index.html +++ b/index.html @@ -66,20 +66,20 @@ github: "https://github.com/w3c/resource-timing/", caniuse: "resource-timing", xref: { - specs: ["hr-time-3", "performance-timeline", "service-workers" ,"xhr"], + specs: ["hr-time-3", "performance-timeline", "service-workers", "xhr"], profile: "web-platform", - }, + }, - localBiblio: { - INCREMENTAL_FONT_TRANSFER: { - title: "Incremental Font Transfer", - href: "https://www.w3.org/TR/IFT/", + localBiblio: { + INCREMENTAL_FONT_TRANSFER: { + title: "Incremental Font Transfer", + href: "https://www.w3.org/TR/IFT/", + }, + EARLY_HINTS: { + title: "Early hints", + href: "https://httpwg.org/specs/rfc8297.html", + } }, - EARLY_HINTS: { - title: "Early hints", - href: "https://httpwg.org/specs/rfc8297.html", - } - }, }; @@ -458,20 +458,21 @@
"body", if the request is a result of processing the
[^body^] element's background attribute that's
already obsolete.
-
- +
"css", if the request is a result of processing a
- CSS url() directive such as @import
- url() or background: url(); [[CSS-VALUES]]
-
- Note: the request for a font resource specified with
- @font-face in CSS is a result of processing a CSS
- directive. Therefore, the `initiatorType` for this font
- resource is "css".
-
@import
+ url() or
+ background: url();
+ [[CSS-VALUES]]
+
+
+ Note: the request for a font resource specified with
+ @font-face in CSS is a result of processing a CSS
+ directive. Therefore, the `initiatorType` for this font
+ resource is "css".
+
"script", if the request is a result of loading any
@@ -486,8 +487,8 @@ "font", if the request is the result of processing
fonts. This can happen when fonts request subsequent resources,
e.g, when [[[INCREMENTAL_FONT_TRANSFER]]] is used.
- "fetch", if the request is the result of processing
the {{WindowOrWorkerGlobalScope/fetch()}} method;
"embed", if the request is the result of processing
an [^embed^] element's [^embed/src^].
- "link", if the request is the result of processing
- an [^link^] element.
- "object", if the request is the result of processing
- an [^object^] element.
- "early-hints", if the request is the result of
- processing an [[[EARLY_HINTS]]] response.
- "link", if the request is the result of processing
+ an [^link^] element.
+ "object", if the request is the result of processing
+ an [^object^] element.
+ "early-hints", if the request is the result of
+ processing an [[[EARLY_HINTS]]] response.
+ "other", if none of the above conditions match.
The contentEncoding getter steps are to return this's resource - info 's [=response body info/content encoding=]. -
-+ info 's [=response body info/content encoding=]. +
+
The renderBlockingStatus getter steps are to return
blocking if
this's timing
@@ -780,25 +781,25 @@
The workerRouterEvaluationStart getter steps are to return
this's timing
- info's [=fetch timing info/service worker timing info=]'s
+ info
The workerCacheLookupStart getter steps are to return this's timing - info's [=fetch timing info/service worker timing info=]'s + info's [=fetch timing info/service worker timing info=]'s [=service worker timing info/worker cache lookup start=].
The workerMatchedRouterSource getter steps are to return this's timing - info's [=fetch timing info/service worker timing info=]'s + info's [=fetch timing info/service worker timing info=]'s [=service worker timing info/worker matched router source=].
The workerFinalRouterSource getter steps are to return this's timing - info's [=fetch timing info/service worker timing info=]'s + info's [=fetch timing info/service worker timing info=]'s [=service worker timing info/worker final router source=].
@@ -1043,18 +1044,25 @@
- As detailed in [=Fetch=], requests for cross-origin resources are - included as PerformanceResourceTiming objects in the - Performance - Timeline. If the timing - allow check algorithm fails for a cross-origin resource, the +
+ This section is non-normative. +
+ +As detailed in [=Fetch=], requests for cross-origin resources are +included as PerformanceResourceTiming objects in the + Performance + Timeline. ++ If the timing + allow check algorithm fails for a cross-origin resource, the entry will be an [=create an opaque timing info|opaque entry=]. Such entries have most of their attributes masked in order to prevent leaking cross-origin data that isn't otherwise exposed. So, for an [=create an opaque timing info|opaque entry=], the following - attributes will be set to zero: + attributes will always return zero or the empty string: {{PerformanceResourceTiming/redirectStart}}, {{PerformanceResourceTiming/redirectEnd}}, {{PerformanceResourceTiming/workerStart}}, @@ -1066,23 +1074,52 @@
- Server-side applications may return the Timing-Allow-Origin - HTTP response header to allow the User Agent to fully expose, to the - document origin(s) specified, the values of attributes that would - have been zero due to those cross-origin restrictions. + Some of the properties, like {{PerformanceResourceTiming/contentType}}, + {{PerformanceResourceTiming/encodedBodySize}}, and + {{PerformanceResourceTiming/decodedBodySize}} are set to zero (or the empty string in the case of + {{PerformanceResourceTiming/contentType}}) when the response is CORS-cross-origin. + + {{PerformanceResourceTiming/transferSize}} is affected both by the timing + allow check and by the CORS-cross-origin status. +
+ ++ For requests handled by a [=service worker=] using {{FetchEvent/respondWith()}}, the reported timing data reflects the + interaction between + the client and the service worker, + rather than the service worker's own internal network activity. + For example, the service worker might respond to a same-origin request with a cross-origin response or vice versa, + or return a cached or synthetic response to either. + Given that, resources forwarded from a service worker do not tell the whole story + of fetching the resource, and do not go through the timing + allow check. + To get the full information about those fetches, the service worker's own performance timeline + can be inspected. [[SERVICE-WORKERS]] + +
+ For more details, see HTTP Fetch #4 - the timing + allow check is only performed when there is no response from the service worker. + In addition, the [=response=] cloned in the {{FetchEvent/respondWith()}} algorithm does not carry the [=/fetch timing + info=] + of the internal fetch, as that information is attached to a fetch rather than to a [=response=]. +
+Timing-Allow-Origin Response Header
+ Server-side applications may return the Timing-Allow-Origin + HTTP response header to allow the User Agent to fully expose, to the + document origin(s) specified, the values of attributes that would + have been zero due to those cross-origin restrictions. +
The Timing-Allow-Origin HTTP response header field can be used to communicate a policy indicating origin(s) that may be