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

Update CLS to max session window 5s cap 1s gap #148

Merged
merged 1 commit into from May 11, 2021
Merged

Conversation

philipwalton
Copy link
Member

Fixes #136. This PR updates the implementation of CLS to use new definition outlined in the post Evolving CLS—a max session window with 5-second max and 1-second gap.

The only observable difference developers might notice to the API is previously the metric.entries array would only ever add new entries as additional shifts occurred on the page. With this change, only the entries from the max session window are reported, which means it could be the case the some of the entries referenced when CLS is first reported (e.g. after the tab is backgrounded), may not be the entries that are referenced the next time the tab is backgrounded. Developers not referencing the metric.entries array should not notice any differences other than a possible reduction in the value reported.

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 this pull request may close these issues.

None yet

1 participant