-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initiator is not well defined #69
Comments
Agreed, I don't think we can change it significantly. That said, what would you propose we change or update with respect to current definition? Aside: I propose we focus this thread on the above and resolve it separately from a design discussion on what we could/should do to tackle the "dependency tree" use case. For the latter, let's open a new thread and describe the use case(s) and what's needed to enable them. |
Taking a second pass at this...
Spec: https://www.w3.org/TR/resource-timing-2/#dom-performanceresourcetiming-initiatortype
One notable omission in above definition is what to return if none of the above match. For example, a quick test with fetch() shows that Chrome returns an empty string, while Firefox returns "other" - @toddreifsteck can you try it on Edge? I think the minimum the need to do here is agree on a fallback. It may also not be a bad idea to add a clause for Fetch.. report "fetch"? Outside of that, I propose we keep the definition as is for L2 as we already have three shipping implementations, and revisit it in L3 - see #8. |
@toddreifsteck @nolanlawson trying to test this on Edge.. but I'm not seeing any fetch-initiated requests in the perf timeline at all. Is this a bug, or am I doing something silly? |
@igrigorik Bug in Edge 14. Fix is understood and will be shipped to Insider builds of Edge 15 in ~2-4 weeks. |
@toddreifsteck gotcha, thanks. Do you know what you guys set the initiatorType value to for fetch-initiated requests? |
We plan to use 'fetch' for initatorType for fetch and mostly like 'beacon' or 'sendBeacon' (depending on other browser's implementation) for sendBeacon. |
Resolved via #80, closing. |
I stumbled on this issue while trying to figure out what edit: I went ahead and entered a separate issue for this: #276 |
I've been looking at specific ways to add more detailed initiator info that would enable getting the dependency tree info from resource-timing (as briefly discussed during TPAC).
When digging deeper into the spec and the current definitions, I found some unfortunate surprises:
initiatorType
sometime points at the type of the resource itself, and sometimes points at the type of the initiator (specifically, with the "css" initiator type)Furthermore, for the purposes of a dependency tree, initiator definition needs to vary from the one practiced with
initiatorType
(and match more closely what happens in the various browser dev tools):I think that for the purposes of
initiatorType
, we'd better define the behavior as it is currently shipped.For the purposes of the "dependency initiator", we probably need to define something slightly different. As
initiatorType
is already shipped and the term "initiator" seems to be overloaded, we probably also want to find a new name.The text was updated successfully, but these errors were encountered: