Skip to content

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

@philipwalton

Description

@philipwalton

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.

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