Value of zero valid for the Core Web Vitals?

Skip to first unread message

Eric Darling

Mar 14, 2024, 2:11:44 PMMar 14
to web-vitals-feedback
Hey all,

We were wondering about the possibility of valid zero values returning for any of the Core Web Vitals, and whether these valid zeroes would be included in the percentile calculations for the Core Web Vitals.

Cumulative Layout Shift - since layout shifts are defined by the Layout Instability API, what happens if no layout-shift events are emitted? There is a note that "an animation frame with no layout instability has an LS score of 0" but would a default value of zero then be valid for CLS in this situation?

Interaction to Next Paint - there is a section on the article regarding What if no INP value is reported? Does this mean that no value or null is returned in this scenario? Additionally what if there are valid user interactions but the Event Timing API entries have negligible latency, would there ever be a case where zero is valid for INP?

Largest Contentful Paint - since LCP "marks the point in the page load timeline when the page's main content has likely loaded" are there situations where a value of zero would be valid for LCP? Must the browser dispatch a "PerformanceEntry of type largest-contentful-paint" in order for LCP to be valid? If no event is ever dispatched, would a default of zero then be valid?

Barry Pollard

Mar 14, 2024, 4:05:47 PMMar 14
to web-vitals-feedback
Hi Eric,

CLS. Yes 0 is a valid CLS score and is taken into account. CLS is reported at the end of the page rather than by each shift. In effect the score is updated with each shift. If there was no update, then the original initial value of 0 is reported.

INP depends on interaction. If a user visits a page and doesn't perform any interactions on the page (note that scrolling with the scrollbar or mouse does not count as an interaction), then the INP value is N/A and it NOT included. INP is only a measure of page views with interactions. And INP of N/A is expected for many static pages and is not an issue. It will not prevent the page from passing Core Web Vitals in tools like PageSpeed Insights. Where pages have "no-op" interactions (e.g. clicking on a random place on the page which has no event handler) it will likely have a small time > 0ms anyway. So an INP of 0 is pretty much technically impossible.

LCP is only included when reported. There are some pages with no LCP-eligble elements (e.g. just a big canvas, or content animated onto the page). In this case no LCP is reported and it is not taken into account (LCP is NOT 0 in this case and is more like N/A). This is extremely rare and the vast majority of pages have an LCP element and are included.

Hope that helps,
Reply all
Reply to author
0 new messages