appzasGamesToolsDevLearnCheat sheetsQuick calcsConvertersReferenceNetworkTimeCalculatorsCompareLLM prices

The rendering path and Core Web Vitals

Lesson 3 of 412 minAdvanced

What the browser must do before it paints, and how to make it faster.

To show a page the browser downloads the HTML, builds the DOM, downloads and parses CSS into the CSSOM, combines them into a render tree, computes layout, then paints. This is the critical rendering path.

  • CSS is render-blocking: the page is not painted until the CSS in the head is ready. Keep it small and inline only the critical part if needed.
  • A normal <script> is parser-blocking. Use defer (runs after parsing, in order) or type="module", or async for independent scripts.
  • Images and fonts do not block the first paint but affect LCP and layout shifts.

Core Web Vitals

MetricMeasuresGood
LCP Largest Contentful PaintWhen the main content appearsUnder 2.5 s
INP Interaction to Next PaintHow quickly the page reacts to taps and clicksUnder 200 ms
CLS Cumulative Layout ShiftUnexpected movement of contentUnder 0.1

What usually helps

  • Serve static files from a CDN with long cache lifetimes and compression (Brotli or gzip).
  • Preload the LCP image or font, and never lazy-load it.
  • Reserve space for images, ads and embeds (width, height, aspect-ratio, min-height).
  • Ship less JavaScript. Split bundles and remove unused code.
  • Test on a mid-range phone and a slow connection, not on your fast laptop.

CarefulLab scores from Lighthouse are a guide. Real users decide: check field data (the Chrome UX Report in Search Console or PageSpeed Insights) for the real picture.

Test yourself

Answer all the questions, then check them. Finish with every answer right to mark the lesson as done.

1. Why is CSS called render-blocking?
2. Which script attribute runs the script after parsing, preserving order?
3. What does CLS measure?

Key terms