Skip to content

Expose PerformanceResourceTiming in Response Objects #491

Closed
@n8schloss

Description

@n8schloss

Problem

Currently the process of linking a fetch request to a specific resource timing object is imperfect. If there are two fetch api requests for the same resource that happen within a short time it's impossible to tell exactly which fetch call initiated which request, leading to some errors in performance logging. Orthogonally, if all a developer cares about is the perf result for a single fetch, having to use the whole performance api could be cumbersome.

Solution?

The ideal solution here (imo) is for there to be a way to get a resource timing object for a specific response. This could be accomplished by adding a method to response objects that give you a promise which will eventually resolve to the PerformanceResourceTiming object once it's ready.

Thoughs?

Note: Since I think this should be a change to the fetch api I filed the issue here as opposed to the performance timeline repo. Happy to move it tough if we think it's better suited there.

(cc, @igrigorik, @spanicker for their thoughts)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions