First Input Delay (FID) Fundamentals
What you'll learn: How to understand the historical metric First Input Delay, main thread blocking, and the shift toward modern responsiveness metrics.
The Evolution of Responsiveness Metrics
Historically, web performance measured responsiveness using a Core Web Vital known as First Input Delay (FID). FID measured the delay between the moment a user first interacted with a page (like clicking a button, tapping a link, or pressing a key) and when the browser could actually start processing that action.
However, on March 12, 2024, Google officially replaced FID with Interaction to Next Paint (INP) as a Core Web Vital, and FID is now deprecated. While FID only measured the initial delay of the first interaction, INP provides a more comprehensive picture by measuring the entire latency of all interactions throughout the page lifecycle. Be sure to check out the course's INP lessons to understand the current metric and modern ranking guidance.
Understanding the Delay: Main Thread Blocking
Even though FID is a legacy metric, understanding why input delays occur is essential because the underlying cause—main thread blocking—remains the primary enemy of web responsiveness.
Browsers are single-threaded for most JavaScript execution, meaning they can only do one thing at a time. When your page loads, the main thread is often busy:
- Parsing and executing large JavaScript bundles
- Processing framework initialization code
- Handling heavy computations
Think of the main thread like a cashier at a busy restaurant. You walk up to the counter ready to order (your click), but the cashier is still processing the previous customer's complex order (a long JavaScript task executing). The time you spend waiting for them to acknowledge you is the input delay. During this time, your input event gets queued and must wait until the main thread finishes its current task before it can respond.
Why We Moved Beyond FID
FID specifically measured the delay for discrete interactions (clicks, taps, key presses) but only captured the waiting time before processing started. It ignored the time it took to actually run the event handlers and present the next visual frame to the user. By understanding the limitations of this legacy metric, you can better appreciate why modern metrics were introduced to measure the full interaction cycle.
Key Takeaway: First Input Delay (FID) is a deprecated, legacy metric replaced by INP on March 12, 2024. However, understanding FID's core concept—that JavaScript blocking the main thread creates responsiveness delays—remains foundational for optimizing modern web performance.