The Core Web Vitals are a set of three website performance metrics that capture how a user experience the performance of your website.
From May 2021, Google will start using Core Web Vitals as a ranking factor in search results.
The three Core Web Vitals are:
This article will explain what these metrics mean and what you can do to improve them.
We'll also look at how to collect these metrics from PageSpeed Insights or find them in Google Search Console.
When first loading a website you'll start with a blank page. Then gradually content will start appearing on the screen.
Different paint timings can be measured and used to evaluate the website's performance.
The First Paint (FP) measures when the browser first starts rendering parts of the page. This includes empty boxes without any content.
The First Contentful Paint (FCP) measures when content, like text or images, is first rendered by the browser.
The Largest Contentful Paint (LCP) measures at what time the largest UI element was rendered on the page.
Paint timing metrics are closest to the metrics Google traditionally used to factor site speed into its rankings. They measure the visual loading experience of your site.
Unlike the First Paint or the First Contentful Paint, the Largest Contentful Paint can increase later on in the page load process if another large element is rendered in the viewport. Your website might look fully loaded, but if part of the page re-renders then the LCP will jump up.
This filmstrip shows an example where this happens when a parallax background is enabled. Other common causes are replacing a low-resolution background image with a high-resolution one, or a slider that advances to the next slide.
For a good user experience, the Largest Contentful Paint should happen within 2.5s of the page starting to load.
Avoid large UI updates once the page has been rendered. To do this, make sure that the resources needed to render the above the fold content of your page are prioritized (for example using preload tags, or by lazy-loading other content).
The First Input Delay (FID) measures how long it takes for the browser to start responding to user interaction, like clicks and taps.
This screenshot of the Chrome DevTools Performance tab shows an example of a busy main thread. If the user tried to interact with the page during the long frames (600.9ms and 994.5ms) it would have taken a long time for the page to respond.
Ideally, the First Input Delay should be under 100ms.
To optimize First Input Delay, record a Performance profile in Chrome DevTools and identify long tasks that block the UI. Is it possible to speed up theses tasks, or to break them up into smaller chunks, so that user interactions can be handled in between?
Third-party scripts can also block the main thread. Check if all of them are necessary, or if some can be loaded later on as needed.
The First Input Delay can only be measured if the user actually interacts with the page. If you're using a lab-based tool like PageSpeed Insights, Lighthouse, or DebugBear, then you won't be able to capture it.
As a substitute, you can look at Total Blocking Time (TBT) instead. It measures how long the page main thread was blocked for while the page was loading. "Blocked" here means that there were long tasks taking more than 50 ms. A series of multiple 40ms tasks would not count toward Total Blocking Time.
Cumulative Layout Shift (CLS) measures how much content moves around after first being rendered.
Layout instability can hurt user experience, for example if a button moves around while the user is trying to click it, or if text shifts around after the user started reading.
This filmstrip shows an example of content shifting around on a page.
To optimize Cumulative Layout Shift, either make sure all content renders in one go, or use placeholders while some content is still loading. That way, even if the UI updates later on, it won't cause existing content to change position.
The CLS should be as low as possible, ideally under 0.1.
Chrome 88 – which is due for release in January 2021 – adds a new Web Vitals lane to the Performance recording. Click on the Web Vitals checkbox to enable the feature, then click on the Start profiling and reload page button on the left.
The recording now shows lanes marking the First Contentful Paint and Largest Contentful Paint, as well as each layout shift that occurs.
Below that you can see a lane called Long Tasks. It shows main thread tasks taking longer than 50ms, with time in excess of 50ms marked in dark blue.
You can find the Core Web Vitals in the PageSpeed Insights report.
Field data has been collected by Google from real users accessing your page. If your website doesn't get much traffic you might not get any data here, or see data aggregated across your entire website.
Lab data is collected in a lab environment when you run the PageSpeed Insights test. It uses a simulated mobile device to generate test data.
You can also view information on Web Vitals in Google Search Console (formerly known as Webmaster Tools).
Select Enhancements and then Core Web Vitals from the sidebar to view how your website is doing.
You can click on the each issue that Google Search Console identified to see what page the issue occurred on.
Continuously monitoring Core Web Vitals in a lab environment lets you catch performance regressions early, and identify opportunities for improvement.
DebugBear not only measures site performance, but also keeps track of the SEO and Accessibility scores generated by Google's Lighthouse tool.