Intent to Ship: deliveryType (Resource Timing)

232 views
Skip to first unread message

Jeremy Roman

unread,
Jun 13, 2023, 5:40:01 PM6/13/23
to blink-dev

Contact emails

jbr...@chromium.org


Explainer

https://gist.github.com/jeremyroman/43f8f290f1f404d3b7f6cb708601c7f0


Specification

https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-deliverytype


Summary

Expose information about how a resource was delivered. For example, resources which were delivered from the cache (currently exposed through transferSize) and navigations which were prefetched by the previous page are useful to identify.


This is currently part of an experiment bundled with other features (because it is necessary to be able to tell whether a page was prefetched to evaluate the utility of prefetching technology), but I believe it's useful to ship independently, and need not be tied to the areas that remain under development/experimentation/discussion.


Blink component

Blink>PerformanceAPIs>ResourceTiming


TAG review

https://github.com/w3ctag/design-reviews/issues/858


TAG review status

Pending


Risks



Interoperability and Compatibility



Gecko: No signal (https://github.com/mozilla/standards-positions/issues/824)


WebKit: No signal (https://github.com/WebKit/standards-positions/issues/204)


Web developers: No public signals, but web.dev and developer.chrome.com were able to successfully use deliveryType to distinguish prefetch from non-prefetch traffic. The major hiccup encountered was the origin trial token not being processed before the deliveryType property was accessed; this difficulty would not exist when the feature is shipped.


Other signals:


WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?



Debuggability

Some of this information is already visible to developers in the Network panel. Developers can use the JavaScript console to access the deliveryType API.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes


Is this feature fully tested by web-platform-tests?

Yes

https://wpt.fyi/results/?label=master&label=experimental&aligned&q=delivery-type


Flag name

No user-visible flag; DeliveryType runtime-enabled feature.


Requires code in //chrome?

False


Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1358591


Estimated milestones

OriginTrial desktop last

118

OriginTrial desktop first

110


OriginTrial Android last

118

OriginTrial Android first

110


OriginTrial webView last

118

OriginTrial webView first

110



Anticipated spec changes


Future changes may add additional delivery types, which would be initially unrecognized by author code - most likely, real user metrics software and services. For example, w3c/resource-timing#303 discusses the possibility of exposing "consume a preload" events on the performance timeline; it might treat this as a separate timing event with a new delivery type. Until this software recognizes this new delivery type, it might report misleading data until it is updated, depending on how it handles unknown values.


Some user agents already redact timing related information more than is required by spec; such user agents may hide the delivery type of resources in such cases, and this may introduce interop risk which is likely to manifest as a distortion of the data collected rather than a user-visible bug.


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6347141115543552


Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACuR13cZU8%3D7Ka3SWSf4E2dgDuhRRBRt_fGgDeC6d%3DqHP%3Durrw%40mail.gmail.com

Intent to experiment:

https://groups.google.com/a/chromium.org/g/blink-dev/c/3-0rLTZePzc/m/VNHWAdAGDQAJ

Intent to extend experiment:

https://groups.google.com/a/chromium.org/g/blink-dev/c/L3mpXE1x3Zk/m/6Lko5dPKAgAJ


This intent message was generated by Chrome Platform Status.

Rick Byers

unread,
Jun 26, 2023, 11:25:25 AM6/26/23
to Jeremy Roman, blink-dev
Note since the TAG and standards position requests were new on this, API owners were waiting a bit to hear if there was any feedback. But it's been two weeks now and this seems like a valuable and minor extension to me and I trust the team to engage constructively with any feedback in this area whenever it comes. So LGTM1 to ship

On Tue, Jun 13, 2023 at 5:39 PM Jeremy Roman <jbr...@chromium.org> wrote:

Contact emails

jbr...@chromium.org


Explainer

https://gist.github.com/jeremyroman/43f8f290f1f404d3b7f6cb708601c7f0


Specification

https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-deliverytype


Summary

Expose information about how a resource was delivered. For example, resources which were delivered from the cache (currently exposed through transferSize) and navigations which were prefetched by the previous page are useful to identify.


This is currently part of an experiment bundled with other features (because it is necessary to be able to tell whether a page was prefetched to evaluate the utility of prefetching technology), but I believe it's useful to ship independently, and need not be tied to the areas that remain under development/experimentation/discussion.


Blink component

Blink>PerformanceAPIs>ResourceTiming


TAG review

https://github.com/w3ctag/design-reviews/issues/858


TAG review status

Pending


Risks



Interoperability and Compatibility



Gecko: No signal (https://github.com/mozilla/standards-positions/issues/824)


WebKit: No signal (https://github.com/WebKit/standards-positions/issues/204)


Note for others reviewing (since I was confused for a minute): the link attached to the above URL is wrong (points to issue #54 not #204)

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACuR13eeaznd8kGyT1LvfiZCUSnRgR2CQeo0eo5dM1h8J%3DBqiw%40mail.gmail.com.

Yoav Weiss

unread,
Jun 26, 2023, 11:58:29 AM6/26/23
to Rick Byers, Jeremy Roman, blink-dev

Mike Taylor

unread,
Jun 26, 2023, 9:01:02 PM6/26/23
to Yoav Weiss, Rick Byers, Jeremy Roman, blink-dev
Reply all
Reply to author
Forward
0 new messages