Error Codes Wiki

Interaction to Next Paint (INP) — Slow Response to User Interactions Fix

Warninggeneral

Overview

Fix high Interaction to Next Paint (INP) scores where button clicks, taps, and keyboard inputs feel sluggish due to long JavaScript tasks blocking the main thread.

Key Details

  • INP replaced FID (First Input Delay) as a Core Web Vital in March 2024
  • INP measures responsiveness: the time from user interaction to the next visual update
  • Google considers INP good if under 200ms, needs improvement between 200-500ms, and poor over 500ms
  • Unlike FID which only measured the first interaction, INP considers ALL interactions during the page lifecycle
  • Long JavaScript tasks (>50ms) block the main thread and delay response to user input

Common Causes

  • Heavy JavaScript execution blocking the main thread during user interactions
  • Third-party scripts (analytics, ads, chat widgets) consuming main thread time
  • Large DOM size causing slow rendering updates after interactions
  • Synchronous layout calculations (forced reflows) triggered by JavaScript

Steps

  1. 1Measure INP: Chrome DevTools > Performance tab > record interactions > check 'Interactions' track
  2. 2Break up long tasks: split heavy JS work into smaller chunks using requestIdleCallback or setTimeout
  3. 3Defer third-party scripts: load analytics and non-critical scripts with async or defer attributes
  4. 4Use Web Workers for heavy computations to keep the main thread free for user interactions
  5. 5Reduce DOM size: large DOMs (>1000 elements) cause slow style and layout recalculations

Tags

inpcore-web-vitalsinteractionresponsivenessmain-thread

Related Items

More in General

Frequently Asked Questions

FID only measured the delay of the first interaction. INP measures all interactions throughout the page lifecycle and reports the worst (or near-worst) interaction latency. INP gives a more complete picture of page responsiveness.