-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Create resource timing entries for HTML resources #6542
Comments
Also needs to consider the |
Updated. |
Thinking about this and also about whatwg/fetch#590, I think that we need something like a "fetch a resource" algorithm/layer/mechanism in the HTML spec, equivalent to the different resource loaders found in the browser engine implementation. This mechanism would deal with setting the initiator type for the resource when reporting, reporting network errors as opaque entries, setting FETCH priority by type, and keeping the @annevk WDYT? I can start jotting down something. |
Also, report timing info for network errors for the fetch() APIs. The timing info attached to a network error is always "opaque", containing only start/end time and the original request URL. This change currently only applies to the fetch API, and should be applied to the different callers of FETCCH as part of [this](whatwg/html#6542) and [this](whatwg/xhr#319) work. Closes whatwg#1215
What is reporting network errors as opaque entries? And what exactly is keeping the |
The different callers, when they report the response. If the response is a network error, it will report it correctly.
Preload is an entirely different subject. See separate effort here. I would prefer to not create a dependency here and tackle the existing network error thing before we tackle preloads. |
I see, generally I would like network error reporting to fall out of the same path we use for normal reporting and not require its own dedicated path. |
It generally wouldn't, except when the caller already has a dedicated path for network errors (like in the case of |
Also, report timing info for network errors for the fetch() APIs. The timing info attached to a network error is always "opaque", containing only start/end time and the original request URL. This change currently only applies to the fetch API, and should be applied to the different callers of FETCCH as part of [this](whatwg/html#6542) and [this](whatwg/xhr#319) work. Closes whatwg#1215
Create a reusable function that fetches a resource and reports the timing when done, given an initiator type. Implement for the following fetches: - link (not including style, yet) - script (classic, module, worker, worklet, import) - img (src, srcset) - link (type=image) - Media (audio, video, track, poster) - A (download, ping) TBD: - Loading resources from CSS (mostly not in the HTML spec) - preload/prefetch/prerender - frames/iframes (might not be needed, as it's a navigation) See whatwg#6542
See w3c/csswg-drafts#562 for CSS. |
Along with the comit 8c0f013,
the phrase "(defined below)" should also be updated to "(defined above)". |
I'm a bit curious how |
Those are not currently reported under resource/navigation timing at all. |
Part of #6542. This also improves the EventSource processing model in general to be more modern and rigorous.
All HTML reporters of resource timing are now specified (prefetch is not specified yet). |
Yay!! Congrats! |
Part of whatwg#6542. This also improves the EventSource processing model in general to be more modern and rigorous.
Now that FETCH has the building blocks for measuring resource timings (see whatwg/fetch#1185 and w3c/resource-timing#252), the different resources have to integrate with it, so that the can decide exactly if and when to queue a resource timing entry.
The resources are:
Done:
<a ping>
): Report A and script loading to resource timing #7180image
: same asimg
, as decribed here.In Progress:
Resources that should avoid creating a resource timing entry:
The text was updated successfully, but these errors were encountered: