-
Notifications
You must be signed in to change notification settings - Fork 426
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
LCP is incorrect if image fails Timing-Allow-Origin check #138
Comments
When I filed this, my primary concern was as a developer testing, and a debug version of the library for such use cases is absolutely perfect for me. The other aspect of this is developers reporting to RUM and then being surprised by mismatches with i.e. CrUX. I think that is addressed fine by documentation (and proactive education?) and needn't be a warning. That said -- I don't think a debug version is super critical as we have increasingly many developer tools for CWV (such as the web-vitals overlap option in DevTools). I would use it if it were available! |
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?
The text was updated successfully, but these errors were encountered: