Skip to content

LCP is incorrect if image fails Timing-Allow-Origin check #138

@mmocny

Description

@mmocny

I was recently surprised to find a mismatch between LCP reported by DevTools timeline and Web Vitals extension. It looks like the cause is simply because the Web Platform api cannot always report the renderTime of image elements which do not pass Timing Allow Origin check for Cross Origin requests.

One easy way to check when this is the case is to check if the renderTime property of the Entry is 0.

If that happens, I think the recorded LCP value is likely not accurate. (In one case I was looking at, it was off by 1.2seconds).

I wonder if it is worth at least warning the developer in such cases?

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