{
    "content": "<h1>First Input Delay (FID)<\/h1><p><a href=\"..\/First-Input-Delay\/\">First-Input-Delay<\/a> is a user-centric performance metric that measures the time between a user's first interaction with a webpage and the moment the <a href=\"..\/Browser-Rendering-Engine\/\">Browser-Rendering-Engine<\/a> is able to start processing that interaction. It is a critical component of the <a href=\"..\/Core-Web-Vitals\/\">Core-Web-Vitals<\/a> suite, specifically targeting the responsiveness and interactivity of a site during its initial load phase.<\/p><h2>Technical Mechanism<\/h2><p>The primary cause of a poor <a href=\"..\/First-Input-Delay\/\">First-Input-Delay<\/a> is heavy <a href=\"..\/JavaScript\/\">JavaScript<\/a> execution. When the <a href=\"..\/Main-Thread\/\">Main-Thread<\/a> is occupied with parsing and executing large script files, it cannot respond to user inputs such as clicks, taps, or key presses. This creates a lag that can frustrate users and lead to higher bounce rates. While <a href=\"..\/Lighthouse\/\">Lighthouse<\/a> provides a proxy metric called <a href=\"..\/Total-Blocking-Time\/\">Total-Blocking-Time<\/a>, FID is a field metric that requires real user data, often collected via the <a href=\"https:\/\/developer.chrome.com\/docs\/crux\/\">Chrome-User-Experience-Report<\/a>. Documentation on optimizing these interactions can be found at <a href=\"https:\/\/web.dev\/articles\/fid\">web.dev<\/a>.<\/p><h2>Thresholds and Benchmarks<\/h2><p>To provide a good user experience, sites should strive to have a <a href=\"..\/First-Input-Delay\/\">First-Input-Delay<\/a> of 100 milliseconds or less. A delay between 100ms and 300ms is categorized as needing improvement, while anything above 300ms is considered poor. Developers can optimize these scores by minifying scripts, removing unused <a href=\"..\/JavaScript\/\">JavaScript<\/a>, or implementing code-splitting. Further technical details are available on <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Glossary\/First_input_delay\">MDN Web Docs<\/a>.<\/p><h2>Transition to Interaction to Next Paint<\/h2><p>In the evolving landscape of <a href=\"..\/Web-Performance\/\">Web-Performance<\/a>, Google has replaced FID with <a href=\"..\/Interaction-to-Next-Paint\/\">Interaction-to-Next-Paint<\/a> (INP) as a Core Web Vital. INP is considered a more comprehensive metric because it measures all interactions on a page, whereas FID only measured the very first one. More details on the transition can be found at <a href=\"https:\/\/web.dev\/blog\/inp-cwv-march-2024\">web.dev's blog<\/a>.<\/p><h3>Related Topics<\/h3><ul><li><a href=\"..\/Interaction-to-Next-Paint\/\">Interaction-to-Next-Paint<\/a><\/li><li><a href=\"..\/Largest-Contentful-Paint\/\">Largest-Contentful-Paint<\/a><\/li><li><a href=\"..\/Cumulative-Layout-Shift\/\">Cumulative-Layout-Shift<\/a><\/li><li><a href=\"..\/Total-Blocking-Time\/\">Total-Blocking-Time<\/a><\/li><\/ul>",
    "tags": [
        "performance",
        "web-vitals",
        "fid",
        "seo",
        "javascript",
        "optimization",
        "frontend",
        "page-speed",
        "user-experience",
        "interactivity"
    ]
}