Core Web Vitals

What are the Core Web Vitals and why do they matter? Learn how to improve the Core Web Vitals

Arjen Karel Core Web Vitals Consultant
Arjen Karel
linkedin

Core Web Vitals

Core Web Vitals are a subset of the Google Page Experience. The Core Web Vitals are high-level metrics, designed by Google, to capture the user experience. Three core Web Vitals metrics are measured: Largest Contentful Paint, First Input Delay, and Cumulative Layout Shift. Each of these metrics is automatically assigned a rating of Good, Needs Improvement, or Poor based on the industry standard methodology and testing designed by Google.

You will learn what the Core Web Vitals are and how to measure and improve them.

Google page experience and Core Web Vitals

The Core Web Vitals are a subset of Google's page experience score. Page experience is a set of signals that measure how users perceive the experience of interacting with a web page beyond its pure information value, both on mobile and desktop devices.

google page experience core web vitals

You can find your site's Page Experience data Core Web Vitals data in the 'Experience' section of your Google Search Console account.

Page Experience report search console page experience
Core Web Vitals search console page experience cwv

What are the Core Web Vitals?

Google's Core Web Vitals are three metrics (Largest Contentful, Paint First Input Delay and Cumulative Layout Shift) that measure the user experience on websites. These metrics rate how quickly page content loads, how quickly a browser can respond to a user's input, and how (un)stable the content is as it loads in the browser.

core web vitals all metrics

Why do the Core Web Vitals matter?

Now that you know what the Core Web Vitals are the next question is: "Why should I care about the Core Web Vitals?". Now this is a great question.

Core Web Vitals = great UX

Mostly the Core Web Vitals are about a great user experience . The Core Web Vitals give you an idea of how user wills experience your website. When users have a better experience, they’re more likely to convert into customers and return to your site.

Core Web Vitals = ranking factor

The Core Web Vitals are also a (small) ranking factor in Google. Passing the Core Web Vitals might just give you that competitive edge. I have seen this happen many times over. This is what Google themselves say about the matter: "Great page experience doesn't override having great page content. However, in cases where there are many pages that may be similar in relevance, page experience can be much more important for visibility in Search."

Core Web Vitals = top stories

Also good to mention: Previously an AMP page was required for a position in Top Stories of the mobile Google Search. The goal with this was to speed up the mobile web. But with the Core Web Vitals, AMP will no longer be a necessity.

What is important from 2021 is that your mobile pages simply score well on page experience.

But that doesn't mean you should convert your AMP pages either. If your AMP pages score well on Core Web Vitals, that's totally fine and then leave it be.

This also applies the other way around: your mobile website does not need AMP, but must therefore score well on the Core Web Vitals.

How to measure the Core Web Vitals

The Core Web Vitals are measured by Google and are recorded in the CrUX dataset. CrUX is the official dataset of the Web Vitals program. All user-centric Core Web Vitals metrics will be represented in the dataset.

CrUX data

  1. The CrUX Dashboard is a Data Studio dashboard that allows you to query and render CrUX data into an interactive dashboard, as well as exporting PDF reports.
  2. CrUX on BigQuery provides a publicly accessible database of all origin-level data collected by CrUX. It is possible to query any and all origins for which data is collected, analyze any metric that CrUX supports and filter by all available dimensions. Full metric histograms are stored in the BigQuery tables allowing for visualization of performance distributions, including experimental metrics.
  3. The CrUX API provides programmatic access to CrUX data by page or origin, and can be further filtered by form factor, effective connection type and metrics.
  4. PageSpeed Insights uses CrUX to present real-user performance data alongside performance opportunities powered by Lighthouse.
  5. The PageSpeed Insights API offers programmatic access to the data shown in PageSpeed Insights, including Core Web Vitals data from CrUX.

CoreDash RUM data

RUM Data

Rum data is collected from Real User Monitoring. RUM data is the next best thing to the CrUX dataset. The CrUX dataset is highly anonymous and does not lend itself to be analyzed very well. The CrUX data is also 28 days behind. That is why many Core Web Vitals professionals rely on Real User Metrics. Just like the CrUX data, real user data is being used to measure the Core Web Vitals.

CoreDash RUM data

Lighthouse

Lighthouse is a powerful tool. But understand this: Lighthouse does not measure the Core Web Vitals! Lighthouse is a so-called LAB tool. Lighthouse performs an analysis under specific circumstances. It does not navigate between pages, does not cache resources, does not interact with the website and does not mimic real life circumstances.

Nevertheless lighthouse is a great tool and if used properly it will tell you a lot about the Core Web Vitals issues on a page.

The best way to load a lighthouse analysis it through PageSpeed Insights, through your browser of via the Lighthouse command-line tool.

lighthouse audit

How to pass the Core Web Vitals?

Each of these metrics is automatically assigned a rating of Good, Needs Improvement, or Poor based on the industry standard methodology and testing designed by Google. To pass the Core Web Vitals at least 75% of your visitors need to have a 'good' LCP, FID and CLS score in the Google CrUX dataset.

Let's take a closer look at those metrics, see what they are and how to improve them.

Largest Contentful Paint

Largest Contentful Paint (LCP) is one of the three Core Web Vitals metrics. The LCP captures the Loading part of the Core Web Vitals and represents how quickly the main content of a web page is loaded. Specifically, LCP measures the time from when the user initiates loading the page until the largest image or text block is rendered within the viewport.

largest contentful paint

What is the Largest Contentful Paint?

The largest Contentful paint is a largest single element that has content of the type image or text that has been painted on the visible part of the screen. The LCP timing indicates the time in milliseconds between requesting the page and when the largest contentful (DOM) element is displayed on the visible part of the web page (above the fold).

The LCP is chosen because it focused on a visitor's user experience. When the LCP occurs you can assume that a visitor thinks the page is finished (while that may not be the case at all).The LCP was created to answer the question: ' When is the content of a page visible?'.

What is a good LCP score?

A good LCP score is anything below a 0 and 2.5 seconds. If your LCP score is between 2.5 and 4 seconds it needs improvement. Any LCP score above 4 seconds is considered poor. To pass the Core Web Vitals for the Largest Contentful Paint at least 75% of your visitors need to have a 'good' LCP score.

How to improve the LCP

When a page renders a lot might happen. Styles, scripts, fonts and images usually compete for network and CPU resources. Everything that happens either network or CPU wise before the LCP element has been painted will affect the LCP.

  1. Prioritize your LCP element with resource hints
  2. Make LCP element Cache-able
  3. Load LCP element from your main domain
  4. Remove render blocking resources.
  5. Avoid unnecessary resource hints
  6. Use critical CSS, split up your CSS files or defer non-critical CSS
  7. Defer or schedule JavaScript
  8. Break up long tasks
  9. Consider a CDN
  10. Pre-render your content

First Input delay (FID)

First Input Delay (FID) is the second of the Core Web Vitals metrics. The FID captures the interactivity or usability part of the Core Web Vitals and represents how quickly the browser responds after the first interaction with a web page.

first input delay

What is the First Input Delay

The First input delay captures the first impression of a site's interactivity or load responsiveness: or how quickly a page responds to the users first interaction.

The First Input Delay measures the time from a users first interaction with a page to the time when the browser is able to respond to that interaction. The first Input Delay cannot be measured by Lab tools like lighthouse because it requires real user input.

In lighthouse the Total Blocking Time metrics correlates pretty well with the First Input Delay. While the FID is usually (a lot) lower the the Total Blocking Time, improving the TBT will also improve the FID.

What is a good First Input Delay Score

A good FID score is anything below a 100 milliseconds. If your FID score is between 100 and 300 milliseconds it needs improvement. Any FID score above 300 milliseconds is considered poor. To pass the Core Web Vitals for the First Input Delay at least 75% of your visitors need to have a 'good' FID score.

How to improve the First Input Delay

A higher FID score is caused by a (long) blocking of the main thread. This is usually caused by heavy JavaScript execution. Optimizing how JavaScript parses, compiles, and executes on your web page will directly reduce the First Input Delay.

  1. Schedule JavaScript.
  2. Split scripts into smaller bundles.
  3. Break up Long Tasks
  4. Use a web worker
  5. Avoid iframes
  6. Async decode your images

Cumulative Layout Shift (CLS)

Cumulative Layout Shift (CLS) is the last of the three Core Web Vitals metrics. The CLS captures the Visual Stability part of the Core Web Vitals and represents unexpected movements of elements on the page as content renders or new content is shown on the page.

cumulative layout shift

What is the Cumulative Layout Shift

The Cumulative Layout Shift focuses on the visual stability of a webpage. In plain English: 'it measures if parts of the page jump around'.

The CLS score is based on 2 'fractions'. The impact fraction and the distance fraction. When an element is visually 'unstable' it will change it's dimensions causing other content to shift. The distance is the number of pixels relative to the viewport. The impact is the size of the affected elements relative to the viewport.

How to improve the Cumulative Layout Shift

The Cumulative Layout Shift can be improved by making sure elements on the page immediately render with their correct and final dimensions

  1. Specify image dimensions. Images without width and height set are by far the number one cause of layout shifts. When image dimensions are missing the image will first render at 0x0 and only when the image has loaded it will take up the space it needs.
  2. Minimize webfont impact. Web fonts can cause layout shifts when they are swapped with the fallback font.
  3. Use placeholders when fetching data. Data that is inserted into the page at a later time will always cause a layout shift. IT is usually a great idea to reserve the space. 
  4. Be careful when banners or frames. Banners and iframes can cause large layout shifts. Reserve the (minimal) space that banners or frame might take up.

What should you learn to become a Core Web Vitals expert?

So you want to eb an expert. That is great! You are in for a bumpy ride! Some parts of the Core Web Vitals are easy to fix. Others are really hard and require years of experience. To become a Core Web Vitals export you basically need to master 4 traits.

First you need to fully understand how browsers work. How does the rendering process work, how do resources get scheduled, when JavaScript gets executed and what happens during the paint process.

Second you need to master JavaScript. I spend a great deal of my time explaining to developers why their code is slow. Slow code will affect the First Input Delay and also the Interaction to Next Paint. In most cases JavaScript code will also affect the Largest Contentful Paint and the First Contentful Paint.

Third you need to be an HTML and CSS expert because the way you build your applications matters a lot. There is often a fast and a slower way of doing things. 

Fourth you need to know how networks and webservers work. Fast networks, the right http headers and the the right protocol for the right situation can make a huge difference in the Core Web Vitals. When yo are going to advice larger corporations you better come prepared!

Do Core Web Vitals plugins work?

There are a lot of plugins and tools out there that try to improve the Core Web Vitals. For example wp-rocket.

I can talk for hours about how I feel about those tools. I will spare you the details for now. The fact of the matter is that they sometimes improve the Core Web Vitals and sometimes they have very little effect.

It all depends on the nature of the 'Core Web Vitals mistakes' that you are trying to fix. Did you forget to lazy-load your images or forget to defer your scripts? Those tools might then improve the Core Web Vitals considerably. On the other hand, if your slowness is caused by 'critical scripts that change the layout of your page' (like a slider plugin) or 'a large DOM size' those plugins will often do more harm than good.

Basically a plugin will fix the issues that any good programmer could fix in a matter of hours. They won't fix and might even worsen the more complicated issues.

Should I focus on mobile or desktop?

That is a great question. As a rule of the thumb you should focus on mobile

When you manage to pass mobile Core Web Vitals it will become a lot easier to also pass the Desktop Core Web Vitals (if you are not passing them already). This is because your average mobile device is slower because of lower bandwidth, less memory and less CPU power then your average desktop.

There are a few exceptions though. On a desktop the visible viewport is larger. It is common for a mobile LCP element to be a text based element while on a Desktop a lower placed image will become the largest Contentful Paint element. On desktop the possibility for (smaller) layout shift also increases because there is just more screen and more visible elements to shift.

Core Web VitalsCore Web Vitals Core Web Vitals