Explore Library
Web PerformancePerformance Metrics & Core Web Vitals

58 items

1

Measuring CLS in the Loading Pipeline

Code Quiz
2

Core Web Vitals & Loading Pipeline

Quiz
3

Measuring CLS with PerformanceObserver

Code Quiz
4

Core Web Vitals: LCP, CLS, INP

Quiz
5

Observing LCP with PerformanceObserver

Code Quiz
6

Understanding LCP and CLS

Quiz
7

Time to First Byte (TTFB)

Slides / Video
8

Lab vs Field Data

Code Quiz
9

p75 Percentile

Code Quiz
10

Rating Boundaries

Code Quiz
11

CLS Thresholds

Code Quiz
12

INP Thresholds

Code Quiz
13

FID Calculation

Code Quiz
14

Computing TTFB

Code Quiz
15

Measuring FCP

Code Quiz
16

Total Blocking Time

Code Quiz
17

Navigation Timing

Code Quiz
18

PerformanceObserver Setup

Code Quiz
19

web-vitals Library

Code Quiz
20

LCP Thresholds

Code Quiz
21

Largest Contentful Paint (LCP)

Slides / Video
22

What Core Web Vitals Are

Slides / Video
23

Tools for Measuring Web Vitals

Slides / Video
24

Lab Data vs Field Data (RUM)

Slides / Video
25

Core Web Vitals: Three Categories

Slides / Video
26

Good vs Poor Metric Thresholds

Slides / Video
27

Time to Interactive (TTI)

Slides / Video
28

LCP Rating Thresholds

Quiz
29

INP Good Threshold

Quiz
30

Why the 75th Percentile

Quiz
31

CLS Good Threshold

Quiz
32

FID Replaced by INP

Quiz
33

The Three Core Web Vitals

Quiz
34

Lab vs Field Data

Quiz
35

What LCP Measures

Quiz
36

What INP Measures

Quiz
37

Total Blocking Time Basics

Quiz
38

Speed Index Basics

Quiz
39

What CLS Measures

Quiz
40

Why Metrics Are User-Centric

Quiz
41

Time to Interactive Basics

Quiz
42

Interaction to Next Paint (INP)

Flashcard
43

Percentiles (p75) in Measurement

Flashcard
44

Lab Data vs Field Data

Flashcard
45

Speed Index

Flashcard
46

First Contentful Paint (FCP)

Flashcard
47

Time to First Byte (TTFB)

Flashcard
48

What Core Web Vitals Are

Flashcard
49

Cumulative Layout Shift (CLS)

Flashcard
50

Time to Interactive (TTI)

Flashcard
51

Core Web Vitals Thresholds

Flashcard
52

First Input Delay (FID)

Flashcard
53

Largest Contentful Paint (LCP)

Flashcard
54

Total Blocking Time (TBT)

Flashcard
55

First Contentful Paint (FCP)

Slides / Video
56

Interaction to Next Paint (INP)

Slides / Video
57

Cumulative Layout Shift (CLS)

Slides / Video
58

First Input Delay (FID)

Slides / Video
Code Quiz

Measuring CLS in the Loading Pipeline

Spot the bug in a PerformanceObserver that reports Cumulative Layout Shift.

Codejavascript
let clsValue = 0;

const observer = new PerformanceObserver((list) => {
  for (const entry of list.getEntries()) {
    clsValue += entry.value;
  }
  console.log('Current CLS:', clsValue);
});

observer.observe({ type: 'layout-shift', buffered: true });

This code over-reports CLS. What is the bug and how do you fix it?