Skip to content
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

There is no way to early-report zero-value CLS scores #279

Closed
philipwalton opened this issue Nov 14, 2022 · 0 comments · Fixed by #283
Closed

There is no way to early-report zero-value CLS scores #279

philipwalton opened this issue Nov 14, 2022 · 0 comments · Fixed by #283

Comments

@philipwalton
Copy link
Member

If the reportAllChanges option is set to true, every metric exposed by this library will early report some value—except for CLS for pages where there are no layout shifts. The implications of this is it's more likely that a page with no CLS will fail to report any value in cases where unload or background detection is unreliable.

For sites that would like to eagerly report metric values and then update them if/when new values are reported, it should be possible to eagerly report zero-CLS.

Note that it can't be assumed that a page that didn't report any CLS had zero CLS, since pages that don't report FCP also do not report CLS. To account for this, I think it makes sense to report a zero-value CLS as soon as FCP is reached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant