Interaction to Next Paint (INP) is a new Core Web Vital that measures the overall responsiveness of a page to user interactions. It observes the latency of all clicks, taps, and keyboard interactions made by a user during their visit to a page and reports a single, representative value. This metric replaces First Input Delay (FID) as the primary measure of interactivity, providing a more comprehensive assessment of responsiveness throughout the page's lifecycle.
A good INP score is typically 200 milliseconds or less. For developers, optimizing INP means ensuring that your website responds quickly to user input. High INP values often indicate that the main thread of the browser is busy with other tasks, such as executing large JavaScript bundles, rendering complex layouts, or processing heavy network requests, delaying the visual feedback to the user.
To improve INP, focus on reducing JavaScript execution time, breaking up long tasks, optimizing event handlers, and ensuring efficient rendering. For instance, if a user clicks a button to open a modal, a good INP ensures the modal appears almost instantly, providing immediate visual feedback. If there's a noticeable delay, it could be due to excessive JavaScript running on the main thread, which needs to be optimized.