Rendering

Page speed basics

Check Core Web Vitals and fix the most common causes of slow loading, slow interaction and layout shift. Use when a user asks about page speed, PageSpeed Insights scores, or Core Web Vitals in Search Console.

page-speed-basics/SKILL.md

Facts to use

  • Core Web Vitals and the "good" thresholds, measured at the 75th percentile of real page loads:
    • Largest Contentful Paint (LCP): 2.5 seconds or less.
    • Interaction to Next Paint (INP): 200 milliseconds or less.
    • Cumulative Layout Shift (CLS): 0.1 or less.
  • Field data (real users, from the Chrome UX Report) is what Search Console shows. Lab data (Lighthouse) helps find causes.

Workflow

  1. Read the Core Web Vitals report in Search Console and run PageSpeed Insights on the main templates.
  2. For poor LCP, check in this order: slow server response, a large hero image, render-blocking CSS or JavaScript, the LCP element loaded late by JavaScript, lazy loading on the LCP image.
  3. For poor INP: long JavaScript tasks, large bundles, heavy third-party scripts, expensive work in event handlers.
  4. For poor CLS: images and embeds without width and height, ads or banners that push content, web fonts that swap late.
  5. Fix the top cause per template first. Re-test after each change.

Common fixes

  • Serve images in modern formats at the displayed size. Set width and height.
  • Do not lazy-load the LCP image. Consider fetchpriority="high" on it.
  • Split JavaScript by route. Defer scripts that the first view does not need.
  • Reserve space for banners and embeds.

Output

A table per template: metric, field value, cause found, fix, expected effect.

Sources

  • web.dev: How the Core Web Vitals metrics thresholds were defined. https://web.dev/articles/defining-core-web-vitals-thresholds
See all 30 skills