First Input Delay (FID)

What is FID ?

The First Input Delay is one of the key metrics of Core Web Vitals. FID measures the time between a user interaction with the page and the browser response time after it.

What is a good FID ?

A good FID is less than 100 milliseconds from the time the user interacts with the page to the time the browser responds to the user's action. The lower the FID, the faster the page is navigable and the more users will have a good impression of your site. 

How does the FID work ?

As a user, it is common to want to interact with a web page that has been loaded, but nothing happens. This is because the main thread of the browser is busy (often analyzing and executing JavaScript files) and cannot respond immediately to the user.

This is why a long FID (+100 milliseconds) usually indicates that the content of a page is displayed, but that it is not fully interactive. 

How is FID measured ?

All users do not necessarily seek to interact with a web page, some interactions are done when the main thread is busy, others will be done at the right time when the main thread is inactive ... This means that not all users will have the same FID.

There are two main ways to measure the FID : 

the Real User Monitoring, which will analyze the real traffic of the site, make continuous measurements and analyze human behaviors. We then use field tools to measure the FID:

  • Chrome User Experience Report, PageSpeed Insights, Search Console & Firebase Performance Monitoring.
  • using the web-vitals JavaScript Library :
import {getFID} from 'web-vitals';
// Measure and log the current FID value,
// any time it's ready to be reported.