resource-timing
resource-timing copied to clipboard
Collect initiatorType use-cases
There are a few concerns and questions with initiatorType. Some examples:
- CSS files are included via
<link>tags so have ainitiatorType="link", which causes confusion since there is a separatecssinitiatorTypethat is used if a CSS file downloaded something (e.g. fonts,background-image) <link rel="preload"/>preloaded resources all haveinitiatorType="link"too<video>tag behavior is inconsistent and may need to add clarity: https://github.com/w3c/resource-timing/issues/130<video poster="">and<video src="">would both beinitiatorType="video"- etc
We are considering how to best address these concerns/questions. Is it better to fix and clarify V2 for cases that we can? Or should we design something differently for V3 that works better?
In order to make that decision, we should try to capture as many use-cases as possible -- what elements/things/etc trigger downloads and what info would consumers want about those downloads?
Example Use-Cases
These are the use-cases I know about:
<img src="..."><img srcset="..."><link rel="stylesheet" href="..."><link rel="prefetch" href="..."><link rel="preload" href="..."><link rel="prerender" href="..."><link rel="manfiest" href="..."><script src="...">- CSS
@font-face { src: url(...) } - CSS
background: url(...) - CSS
background: url(data:...)(shouldn't be downloaded) - CSS
@import url(...) - CSS
cursor: url(...) - CSS
list-style-image: url(...) <body background=''><input src=''>XMLHttpRequest.open(...)<iframe src="..."><frame src="..."><object><svg><image xlink:href="...">navigator.sendBeacon(...)fetch(...)<video src="..."><video poster="..."><video src="...">withRange:requests<video><source src="..."></video><audio src="..."><audio src="...">withRange:requests<audio><source src="..."></audio><picture><source srcset="..."></picture><picture><img src="..."></picture><picture><img srcsec="..."></picture><track src="..."><embed src="..."><a ping="...">(too late?)favicon.icoand other auto-downloads- UA extensions
- EventSource
I'm probably missing some things in the above list.
There are also downloads initiated from extensions that sometimes show up in ResourceTiming data. I think @jzyang has seen a bunch of strange url schemes show up in our resource timing data as well. I'll let her chime in with more info.
We'll keep this issue for Level 3 to decide how we can address some of the above confusion.
We'd also like to build tests for all existing Level 2 behavior. That is tracked in https://github.com/w3c/resource-timing/issues/138