First Input Delay (FID) is a member of the new Core Web Vitals released by Google this May. The goal of this metric is to measure the responsiveness of your site.
More basically:
Does this page respond when I click it?
It's important that your pages load quickly. It's equally important that your visitors can actually interact with that page quickly as well.
How is FID calculated?
Have you ever clicked on a textbox and had to wait a brief moment for the site to respond to your click?
That's an input delay. FID is simply the measure of the first input delay to happen on your site.
On the technical side, this means the metric measures from the start of a user interaction event to the time when the browser is able to begin processing the event with a handler.
FID is the time it takes between an input event and the next time the main thread is idle.
This result should be within the ranges below:
Which elements impact FID?
Any element that can receive an input event can impact FID, including:
- All <input> elements
- <a> tags
- Dropdowns
How can I debug FID issues?
FID is a metric that can only be collected in the field, meaning real users must interact with your site.
If you're not using a real user monitoring (RUM) tool, consider trying to improve your Total Blocking Time (TBT). Google claims that TBT serves as a great proxy for FID.
Google has a very thorough guide for improving your FID here.
Be sure to install the Chrome extension to keep an eye on your First Input Delay while developing/browsing your site.
Quick fixes for FID
- Reduce both first party and third party scripts.
- Chunk your code to optimize bundle size.
- Defer non-critical JavaScript with async or defer.
How can I track my FID score?
There are currently four ways to track your Web Vitals:
- Page audits (Lighthouse and PageSpeed Insights)
- A Chrome extension
- Google Search Console
- Manual tracking
Read our guide on tracking your site's vitals.