Notes
Core Web Vitals
Core Web Vitals are three numbers. Largest contentful paint: how long until the main content is visible; good is two and a half seconds or less. Interaction to next paint: how quickly the page reacts to taps and clicks; good is two hundred milliseconds or less. Cumulative layout shift: how much visible content jumps around while loading; good is zero point one or less. Each is judged at the seventy fifth percentile of real visits.
LCP Largest Contentful Paint
main content visible
good ≤ 2.5 s
INP Interaction to Next Paint
reacts to taps and clicks
good ≤ 200 ms
CLS Cumulative Layout Shift
content jumping around
good ≤ 0.1 Lab vs field
There are two kinds of data. Lab data comes from one controlled run, with Lighthouse, Playwright or WebPageTest; it is repeatable, which makes it good for CI and debugging. Field data comes from real users' browsers, through real user monitoring or Chrome's user experience report; it is what users actually feel. Interaction to next paint needs real interactions, so lab tools use total blocking time as a stand in.
- lab: one controlled run (Lighthouse, Playwright, WebPageTest), repeatable, good for CI and debugging
- field: real users' browsers (RUM, Chrome UX Report), what Google and users see
- INP needs real interactions: lab uses TBT as a stand-in
Lighthouse
We ran Lighthouse on ShopRung's home page three times for each preset. The mobile preset simulates a mid range phone on a slow 4G connection. Mobile scored ninety seven, desktop ninety nine. The main content appeared in about one and a half seconds on mobile, with no blocking time, and the timings moved a little between runs. But look at layout shift: zero point one zero seven on mobile in every run, just over the zero point one limit. A ninety seven score can still hide a failing vital.
mobile desktop score 97 99 FCP 1.1-1.3 s 0.3-0.4 s LCP 1.4-1.6 s 0.4-0.5 s TBT 0 ms 0 ms CLS 0.107 0.061 mobile = a simulated mid-range phone on a slow 4G network
Find the cause
Lighthouse's layout shifts audit named the element: the footer, once on mobile and twice on desktop. ShopRung's page loads first, then JavaScript fetches the products and draws twelve cards, pushing the footer down. On a narrow phone screen that movement is large. The usual fixes reserve space before the data arrives: a minimum height for the product grid, or placeholder skeleton cards, plus width and height on images.
mobile: body > footer.foot 0.107 desktop: the footer twice, 0.054 + 0.007 why: the page loads, then JavaScript fetches products and draws 12 cards; the footer is pushed down fix: reserve space (min-height, skeleton cards) before data
Test it
We turned this into a Playwright test. An init script observes layout shift entries and adds up their values, ignoring shifts caused by user input. The test loads the page, waits for twelve product cards, and expects a total under zero point one. At a phone width of four hundred and twelve pixels it failed with zero point one two six. Lighthouse, which also emulates a slow network, said zero point one zero seven; both are over the limit. At desktop width the test passed with zero point zero three seven.
test.use({ viewport:
{ width: 412, height: 823 } });
addInitScript: PerformanceObserver
type "layout-shift", sum values
without recent input
goto("/"); expect 12 articles
expect(cls).toBeLessThan(0.1)
412 px wide: 0.126 ✗ failed
1280 px wide: 0.037 ✓ passed DevTools
Testers should also feel it. In Chrome DevTools, throttle the network to slow 4G and slow the CPU four times, then record a page load or a click in the performance panel. Long tasks over fifty milliseconds show in red; they cause poor responsiveness. The performance panel shows live LCP, INP and CLS values, and the rendering tab can highlight areas that shift. Then try a real inexpensive phone.
- Network: throttle to slow 4G
- Performance: CPU 4x slowdown, record a load or a click → long tasks (> 50 ms) in red
- Performance panel shows live LCP, INP and CLS
- Rendering: highlight layout shift regions
- test on a real cheap phone too
Budgets in CI
Make it a gate. Lighthouse CI runs Lighthouse in the pipeline several times and asserts on results, such as LCP under two and a half seconds, CLS under zero point one and a minimum score. Size budgets limit JavaScript, images and fonts. Playwright checks like ours catch specific regressions. And in production, real user monitoring alerts when the seventy fifth percentile crosses a threshold.
- Lighthouse CI (lhci autorun): assert LCP < 2500, CLS < 0.1, score ≥ 0.9, run 3 times
- size budgets: JS < 200 KB, images, fonts
- Playwright checks like CLS
- field: RUM alerts when p75 passes a threshold
Common mistakes
Mistakes. Testing only on a fast laptop and fast network. Trusting the overall score instead of the individual metrics; ShopRung scored ninety seven while failing layout shift. Drawing conclusions from one Lighthouse run, when results vary between runs. Using only lab data and never field data. And assuming a fast server means a fast page.
- testing only on a fast laptop and fast network
- trusting the score, not the individual metrics
- one Lighthouse run (it varies)
- lab only, never field data
- server speed = page speed
Say it like this
In the interview: I test against Core Web Vitals, LCP up to two and a half seconds, INP up to two hundred milliseconds, and CLS up to zero point one at the seventy fifth percentile. I run Lighthouse with the mobile preset several times and read each metric, not just the score, add Playwright checks for specific problems like layout shift, put budgets in CI with Lighthouse CI, and confirm with field data from real users.
- "Core Web Vitals: LCP ≤ 2.5 s, INP ≤ 200 ms, CLS ≤ 0.1 at p75.
- Lighthouse on the mobile preset, several runs, checking each metric, not just the score;
- Playwright checks for things
- like layout shift; Lighthouse CI
- budgets in the pipeline; and field data from RUM to confirm
- what real users feel."