← Blog

What is INP in Core Web Vitals and How to Optimize It

INP replaced FID to measure page responsiveness across all clicks and taps. Learn how to eliminate main-thread bottlenecks and pass Google Core Web Vitals.

Measuring and optimizing Interaction to Next Paint (INP) for Core Web Vitals

Google officially replaced First Input Delay (FID) with Interaction to Next Paint (INP) as a core pillar of its Core Web Vitals standard. While FID only inspected the very first user interaction during the initial page load, INP observes all user interactions—button clicks, navigation drawer toggles, filter adjustments, accordion expansions, and form submissions—throughout the entire lifetime of a session.

Quick answer: Interaction to Next Paint (INP) measures the duration between a user triggering an event (such as tapping a button) and the browser rendering the updated frame on screen. To pass Google’s performance threshold, INP must remain under 200 milliseconds for at least 75% of real-world page visits. Optimizing it requires breaking up long JavaScript tasks, deferring non-urgent computations, and painting immediate visual feedback.

Why FID Was Inadequate and How INP Works

FID measured only how quickly the browser began parsing the user’s initial click. It failed to account for how long the underlying event handler took to execute or when the visitor actually saw the visual response rendered on their display.

In contrast, INP measures the entire interaction lifecycle, consisting of three discrete phases:

  1. Input Delay: The latency between the physical screen tap or click and the moment the event handler starts running (often elevated when the main thread is occupied by unrelated background scripts).
  2. Processing Time: The duration required for the JavaScript callback function to run its calculations.
  3. Presentation Delay: The time needed for the browser engine to recalculate layout, restyle elements, paint the pixels, and present the new visual frame to the user.

Google’s Official Performance Thresholds

Based on real-world field metrics collected in the Chrome User Experience Report (CrUX), performance is graded in three tiers:

Performance GradeINP DurationStatus
Good≤ 200 msPasses Core Web Vitals
Needs Improvement200 ms – 500 msPotential negative ranking impact
Poor> 500 msSevere interface freezing, ranking penalty

Common Root Causes of Elevated INP

1. Main Thread Long Tasks

Any continuous JavaScript task exceeding 50ms is classified as a Long Task. When a website bundles unoptimized analytics tags, marketing pixels, live chat widgets, and bloated third-party frameworks, the browser’s main thread remains continuously saturated. If a customer clicks an action button during that period, the event sits in a processing queue until the thread clears.

2. Synchronous Recalculation of Large DOM Trees

In e-commerce stores, adjusting a price or category filter often recalculates layout for hundreds of product cards simultaneously. Performing synchronous DOM mutations and sorting on the main thread freezes the viewport instantly.

3. Missing Immediate Visual Feedback

When a visitor taps “Add to Cart”, they expect instant acknowledgement (such as a loader state, checkmark, or button color transition). If the interface waits for an asynchronous network API roundtrip before updating any visual indicator, Presentation Delay surges.

Engineering Techniques for Sub-200ms INP

Task Chunking via scheduler.yield() or setTimeout

When a script must perform heavy calculations, yield control back to the rendering engine so it can draw an intermediate visual frame before proceeding:

async function handleFilterChange(filters) {
  // 1. Immediately paint UI acknowledgement
  showLoadingIndicator();
  
  // 2. Yield control back to the browser to render the frame
  if ("scheduler" in window && "yield" in window.scheduler) {
    await window.scheduler.yield();
  } else {
    await new Promise((resolve) => setTimeout(resolve, 0));
  }
  
  // 3. Execute the data filtering calculation
  applyProductFilters(filters);
}

Selective Hydration and Islands Architecture

Rather than deploying heavy single-page application architectures where the entire document requires client-side JavaScript hydration, an Islands architecture (such as Astro) keeps 90% of the page as clean, static HTML. Interactive components hydrate independently (client:idle or client:visible), leaving the main thread free to respond to user gestures without hesitation.

Offloading or Pruning Third-Party Trackers

Every analytics tag or tracking snippet that fails to prove direct business value should be audited and removed. Essential marketing tags should be deferred, loaded asynchronously, or delegated to background web workers (via tools like Partytown) to prevent competition with primary user inputs.

Summary

INP is far more than an abstract technical metric; it directly determines conversion efficiency, bounce rates, and organic visibility on Google. A website that responds immediately to every touch builds trust, eliminates accidental double submissions, and guarantees a smooth user experience on any device.

Does your website need a technical performance review?

See what website performance optimisation covers, or send the URL for an initial discussion based on the page's actual bottlenecks.

Website performance optimisation Send your website