Interaction to Next Paint
A Core Web Vital measuring how quickly a page visibly responds to clicks, taps and key presses, taking roughly the worst interaction of the visit.
In more detail
INP stands for Interaction to Next Paint; good is 200 milliseconds or less. It is hurt by long tasks, so break work up, yield to the main thread and move heavy work to workers.
Related terms
- Core Web Vitals — Google's three key user-experience metrics for web pages: Largest Contentful Paint for loading, Interaction to Next Paint for responsiveness and Cumulative Layout Shift for visual stability.
- long task — A task that keeps the main thread busy for more than 50 milliseconds, long enough for users to notice lag.
- scheduler.yield() — A browser API that pauses a long-running async function so the browser can handle input and rendering, then resumes it with high priority.
- main thread — The first thread a program starts with; in a browser page it also runs JavaScript and handles input, layout and painting.
Taught in
- The Fetch API: Streaming Responses, HTTP Caching And Keepalive — Frontend Architecture & Web Platform
- Core Web Vitals: Measuring And Optimizing LCP, INP, And CLS — Frontend Architecture & Web Platform