Glossary

Lighthouse

What is Lighthouse?

Lighthouse is an open-source, automated tool that loads a web page, runs a series of audits against it and reports how well the page did. Each failed audit explains why it matters and how to fix it. It works on any page, public or behind a login.

How it works

The report scores four categories: Performance, Accessibility, Best Practices and SEO.

The Performance score is a weighted average of lab metrics. developer.chrome.com gives these weights for Lighthouse 10: Total Blocking Time 30%, Largest Contentful Paint 25%, Cumulative Layout Shift 25%, First Contentful Paint 10% and Speed Index 10%. Each raw value becomes a score from 0 to 100 by where it falls among real websites in HTTP Archive data.

Lighthouse is a lab tool. It loads the page in a controlled environment, with set network and device conditions and no user. That makes it good for catching a regression before release, but it does not measure what your visitors experience, and without interaction it cannot report Interaction to Next Paint.

You can run it in Chrome DevTools (the Lighthouse panel), on PageSpeed Insights by entering a URL, as a Node module, or from the command line, which needs Chrome installed:

npm install -g lighthouse
lighthouse https://example.com

Why it matters

One run gives a list of concrete problems across speed, accessibility and search, each with a reference on how to fix it. Run on a schedule or in continuous integration, it shows the release that made a page slower or broke an accessibility check.

What can go wrong

  • The Performance score moves between runs with no code change. developer.chrome.com names A/B tests, changing ads, internet traffic routing, different devices, browser extensions and antivirus software as common causes, and Lighthouse's variability documentation advises using the median of several runs rather than one result.
  • Several Lighthouse runs at the same time on one machine compete for its resources and skew each other's performance results.
  • A good lab score is read as proof that visitors get a fast page, while their devices, networks and caches differ from the lab.
  • A mobile run is compared with a desktop run as if they were the same test.

Check it

For a one-time reading of any page, run Lighthouse from Chrome DevTools or PageSpeed Insights. Ranetrace's Lighthouse monitoring runs Lighthouse audits on a schedule, keeps each audit's full report and the score history, and alerts you when a score moves by at least the threshold you set.

Start monitoring today

Websites go down and code throws errors. Ranetrace tells you when it happens to yours, why it matters and what to do next.

Start your 30-day free trial From $9 a month. No credit card required.