Check 06.01 · Performance and Core Web Vitals

Analyze PageSpeed Insights and Lighthouse

Run PageSpeed Insights and Lighthouse on your key templates, tell real-user data from lab tests apart, then turn the results into a prioritized action list.

Priority
Important
Difficulty
Easy
Estimated time
1 to 2 h
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

PageSpeed Insights (PSI) shows two things on the same page: real data from Chrome users and a lab test run by Lighthouse. The task is to test one page per template, read the right part of the report and turn it into a list of actions ranked by expected impact. The goal is not to reach 100: it is to know what to fix first.

Why it matters

The two parts of the report do not measure the same thing.

  • Field data (top of the report): what your visitors actually experienced over 28 days, measured at the 75th percentile. Google assesses Core Web Vitals on this data: LCP (Largest Contentful Paint, rendering of the largest visible element), INP (Interaction to Next Paint, responsiveness to interactions) and CLS (Cumulative Layout Shift, visual stability).
  • Lab data (bottom of the report): a single load, on a simulated mid-range device with a throttled mobile connection. Lighthouse derives a score from 0 to 100 and a list of diagnostics from it.

The Lighthouse score is not a ranking factor. It is a weighted average of five lab metrics: TBT (Total Blocking Time, time the main thread is blocked) at 30%, LCP 25%, CLS 25%, FCP (First Contentful Paint, first render) 10% and Speed Index 10%. It varies from one test to the next, and a page can score 60 in the lab while passing Core Web Vitals in the field, or the other way round.

The lab is still essential: it alone explains why a page is slow and lets you test a fix before it goes live.

What it improves

  • Prioritization You tackle the cause that weighs most on the failing metric, instead of working through the list of audits in order.
  • Regression detection A before-and-after record for each release immediately shows what a change cost.
  • Core Web Vitals Indirect effect. The analysis improves nothing until the fixes are applied.
  • Rankings No effect from the score itself. No PageSpeed score of 100 is required; only the field thresholds count, among many other signals.

How to check

The task is done when you have three things:

  • the list of the site's templates, with a representative URL for each;
  • a dated record per URL, on mobile: field verdict and lab values;
  • an action list tied to the failing metrics.

For a quick check, open https://pagespeed.web.dev/, enter a URL and look first at the “Discover what your real users are experiencing” block: it shows whether the Core Web Vitals assessment passes for this URL and for the whole origin.

How to implement

Step 1 — Choose the pages to test

Test one URL per template, not just the home page: home, category or listing page, product or service page, article, conversion page (form, cart). Add the pages that get the most organic traffic. Ten to fifteen URLs are enough for most sites.

Record the results in a table:

URL Template Field: LCP Field: INP Field: CLS Lab: score Lab: LCP Lab: TBT Lab: CLS Date
/ Home 2.9 s 180 ms 0.04 62 4.1 s 380 ms 0.02 2026-11-24

Step 2 — Read PageSpeed Insights

  1. Stay on the “Mobile” tab. It is the most demanding one and the one that matches mobile-first indexing.
  2. In the field data block, switch between “This URL” and “Origin”. If the URL does not have enough traffic, only origin data appears; if there is none at all, go straight to the lab section and see analyze real-user CrUX data (opens in a new tab).
  3. Note the failing metrics: those are the ones to fix.
  4. Scroll down to the “Diagnose performance issues” block. Use the “Show audits relevant to” filter (LCP, TBT, CLS) to keep only the diagnostics tied to the failing metric.
  5. Look at the screenshots of the load: they show what visitors see while they wait.

Good to know: since 2025, Lighthouse groups its diagnostics into “insights” (document request latency, render-blocking requests, LCP breakdown, etc.). The labels you read in older tutorials may therefore have changed or disappeared.

Step 3 — Run Lighthouse in Chrome

  1. Open the page in an Incognito window: extensions skew the measurements.
  2. Open DevTools (F12), “Lighthouse” tab.
  3. Choose the “Navigation” mode, the “Mobile” device and the “Performance” category, then start the analysis.

Unlike PSI, the test runs from your own machine and connection: useful for a staging site or a password-protected one, but the results cannot be compared with those of PSI.

Step 4 — Run Lighthouse from the command line

Handy for testing several URLs or keeping the reports. Lighthouse requires a recent version of Node.js.

npx lighthouse https://example.com/ --only-categories=performance --output=html --output=json --output-path=./rapport-accueil

The command produces rapport-accueil.report.html and rapport-accueil.report.json. Add --preset=desktop for a desktop test. Run three to five tests per URL and keep the median: a single test proves nothing.

Step 5 — Query the PageSpeed Insights API

The API returns field data and the Lighthouse report as JSON. It works without a key for a few tries; for regular use, create a key in Google Cloud (Credentials page) and add &key=VOTRE_CLE.

curl -s "https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=https%3A%2F%2Fexample.com%2F&strategy=mobile&category=performance" \
  | jq '{terrain: .loadingExperience.overall_category, score: .lighthouseResult.categories.performance.score, lcp: .lighthouseResult.audits["largest-contentful-paint"].displayValue, tbt: .lighthouseResult.audits["total-blocking-time"].displayValue, cls: .lighthouseResult.audits["cumulative-layout-shift"].displayValue}'

Step 6 — Dig deeper with the Performance panel

The report tells you what; the DevTools “Performance” panel tells you why. It shows the live LCP, CLS and INP of the open page, identifies the LCP element, lists layout shifts and details each interaction. Turn on CPU throttling (4x) and network throttling to get closer to an average phone.

It is the only way to work on INP locally: Lighthouse in Navigation mode does not interact with the page and therefore does not measure INP. TBT is only a proxy for it.

Step 7 — Turn the report into an action plan

Start from the failing field metric, not from the score.

Then rank each action on two criteria: the field metric it moves and the number of pages affected. A template fix that touches every product page comes before an optimization specific to a single page.

Step 8 — Automate the measurements

Lighthouse CI reruns the tests on each deployment and fails the pipeline if a threshold is exceeded. Create a lighthouserc.json file at the root of the project:

{
  "ci": {
    "collect": {
      "url": ["https://example.com/", "https://example.com/blog/"],
      "numberOfRuns": 3
    },
    "assert": {
      "assertions": {
        "largest-contentful-paint": ["error", { "maxNumericValue": 2500 }],
        "cumulative-layout-shift": ["error", { "maxNumericValue": 0.1 }],
        "total-blocking-time": ["warn", { "maxNumericValue": 200 }]
      }
    }
  }
}
npx @lhci/cli autorun

To go further: set a performance budget (opens in a new tab) and integrate performance tests into CI/CD (opens in a new tab).

Common mistakes

  • Aiming for 100: going from 92 to 100 is expensive and changes nothing for Google or for your visitors if the field metrics are already good.
  • Testing only the home page: it is rarely the template that gets the most organic traffic.
  • Reading the “Desktop” tab: the results there are almost always flattering.
  • Drawing conclusions from a single test: the score varies by several points from one run to the next.
  • Confusing field and lab: a fix that shows up immediately in the lab takes up to 28 days to be fully reflected in field data.
  • Testing with your extensions or while logged in: the admin bar, ad blockers and extensions change the page being measured.
  • Forgetting the consent banner: Lighthouse tests the page before cookies are accepted, so without most third-party scripts. See test before and after cookie consent (opens in a new tab).
  • Working through every diagnostic: many have nothing to do with the metric that is causing the problem.

Frequently asked questions

Should I aim for a score of 100 on PageSpeed Insights?

No. The Lighthouse score is not a ranking factor and Google does not require a score of 100. It is a weighted average of five lab metrics that varies from one test to the next. What counts are the field Core Web Vitals: LCP, INP and CLS at the 75th percentile. Going from 92 to 100 is expensive and changes nothing if those metrics are already good.

Why does my PageSpeed score change with every test?

The Lighthouse score comes from a single simulated load, which is sensitive to server response, network conditions and third-party scripts. It therefore moves by several points from one run to the next. Run three to five tests per URL and keep the median, always on mobile and under the same conditions. For the verdict, rely on field data instead, aggregated over 28 days.

What is the difference between field data and lab data?

Field data, at the top of the PageSpeed Insights report, reflects what real Chrome users experienced over 28 days, at the 75th percentile: Google assesses Core Web Vitals on it. Lab data, at the bottom, comes from a single Lighthouse load on a simulated device. It explains why a page is slow and lets you test a fix before it goes live.

Does Lighthouse measure INP?

No, not in Navigation mode: Lighthouse does not interact with the page, so it cannot measure INP, which depends on visitors' clicks and key presses. TBT, the time the main thread is blocked during loading, is only a proxy for it. To work on INP locally, use the Performance panel in Chrome DevTools with CPU throttling turned on.

Updated on

Topic checklist (PDF)

And now?

In the “Performance and Core Web Vitals” topic

  1. Analyze PageSpeed Insights and Lighthouse
  2. Analyze real-user CrUX data
  3. Target LCP ≤ 2.5 s at the 75th percentile
  4. Target INP ≤ 200 ms at the 75th percentile
  5. Target CLS ≤ 0.1 at the 75th percentile
  6. Target TTFB ≤ 800 ms as a benchmark
  7. Optimize hosting and CDN
  8. Enable Brotli/Gzip
  9. Configure browser and server caching
  10. Minify CSS and JavaScript
  11. Remove unused CSS/JS
  12. Reduce render-blocking resources
  13. Defer non-essential scripts
  14. Limit third-party scripts
  15. Optimize database queries
  16. Optimize fonts (WOFF2, font-display)
  17. Preload only critical resources
  18. Optimize the LCP image without lazy loading
  19. Lazy-load offscreen content
  20. Reserve space for media and ads
  21. Reduce DOM complexity
  22. Test before and after cookie consent
  23. Test on a slow mobile connection
  24. Set a performance budget
  25. Preload likely navigations with Speculation Rules
  26. Make pages eligible for the back/forward cache (bfcache)
  27. Diagnose INP with Long Animation Frames (LoAF)