Karachi, Pakistan Mon–Sat: 10AM–7PM PKT
Home Services
Design & Development
UI/UX Design Web Development WordPress Development Responsive Web Design Corporate Website Landing Pages / Microsites E-Commerce Solutions Mobile App Development
Marketing & Growth
SEO Services Content Marketing Social Media Marketing PPC / Google Ads Branding & Creative Speed & Performance
Hosting & Support
Web Hosting Maintenance & Support
Portfolio
Website Design Logo & Graphics
Clients About Blog Free Tools Get a Quote
SEO & Speed Guide

How to Improve INP (Interaction to Next Paint): Causes and Fixes

What INP measures, how to find slow clicks and taps, and code fixes for long tasks, heavy event handlers, third-party scripts and large DOMs.

Improve INP: INP Core Web Vital response time chart

Interaction to Next Paint (INP) measures how quickly a page responds when someone taps, clicks or types. It records the delay from the interaction until the browser paints the next frame, and reports roughly the worst interaction of the visit. A good INP is 200 milliseconds or less. INP replaced First Input Delay (FID) as a Core Web Vital in March 2024, and it is usually harder to pass, because it is caused by heavy JavaScript on the main thread. This guide explains how INP works, how to find slow interactions, and the code-level fixes that bring it down. This guide explains how to improve INP step by step.

Key takeaways
  • Good INP is 200 ms or less; above 500 ms is poor. It is measured from real Chrome users.
  • Every interaction has three parts: input delay, processing time and presentation delay. Fix the biggest one.
  • Break up long JavaScript tasks (over 50 ms) and yield to the main thread so the browser can paint.
  • Third-party scripts such as chat widgets, trackers and ad tags are the most common cause on business sites.

Improve INP: how INP is measured

For every click, tap and key press during a visit, the browser measures three phases: Also, this is one of the easiest ways to improve INP.

PhaseWhat happensTypical cause when slow
Input delayTime before your event handler can startOther JavaScript already running (long tasks)
Processing timeYour event handlers runningHeavy handlers, synchronous work, big state updates
Presentation delayStyle, layout and paint of the next frameLarge DOM, forced layouts, expensive CSS

INP is the longest interaction of the visit, ignoring one outlier for every 50 interactions on very busy pages. Scrolling and hovering are not counted. Google reports the 75th percentile of all visits in PageSpeed Insights and Search Console.

INPRating
0 to 200 msGood
200 to 500 msNeeds improvement
Above 500 msPoor

Improve INP: how to find slow interactions

  1. Search Console → Core Web Vitals shows which page groups fail INP on mobile and desktop.
  2. PageSpeed Insights shows field INP at the top. Lab tests cannot measure INP directly; Lighthouse shows Total Blocking Time (TBT) as a lab stand-in.
  3. Chrome DevTools Performance panel shows live INP for your own interactions. Record, click the slow button, and look for long yellow (scripting) tasks in the Interactions track.
  4. The web-vitals library reports real INP with attribution from your visitors:
import { onINP } from 'web-vitals/attribution';

onINP(({ value, attribution }) => {
  console.log(value, attribution.interactionTarget,
    attribution.inputDelay, attribution.processingDuration,
    attribution.presentationDelay);
});

Test on a mid-range Android phone or with 4x CPU throttling in DevTools. A fast laptop hides most INP problems.

Fix 1: Break up long tasks

Any task that runs longer than 50 ms blocks the main thread. If a visitor taps during that time, the tap waits. Split big jobs into chunks and give control back to the browser between them: So keep this in mind whenever you improve INP.

function yieldToMain() {
  if (globalThis.scheduler?.yield) return scheduler.yield();
  return new Promise(r => setTimeout(r, 0));
}

async function processItems(items) {
  for (const item of items) {
    doWork(item);
    await yieldToMain();   // let the browser handle input and paint
  }
}

scheduler.yield() is supported in Chromium browsers and keeps your task at the front of the queue; the setTimeout fallback works everywhere.

Fix 2: Do less inside event handlers

Show visual feedback first, then do the expensive work after the next paint:

button.addEventListener('click', () => {
  button.classList.add('is-loading');        // cheap, visible change
  requestAnimationFrame(() => {
    setTimeout(() => runExpensiveFilter(), 0); // after the paint
  });
});
  • Debounce search boxes and filters so they do not re-render on every key press.
  • Send analytics events with navigator.sendBeacon() or after yielding, not before the UI update.
  • In React, use startTransition for non-urgent updates so typing stays responsive.

Fix 3: Tame third-party scripts

Chat widgets, heatmaps, multiple analytics tags, social embeds and ad scripts all compete for the main thread. Audit them in DevTools (Performance → Bottom-Up, grouped by domain) and:

  • Remove tags nobody uses. Each Google Tag Manager tag still costs CPU.
  • Load chat widgets only after the first interaction or after a few seconds.
  • Replace heavy embeds, such as YouTube players, with a lightweight preview that loads the real player on click.

Fix 4: Reduce rendering cost

  • Keep the DOM small. Lighthouse warns above about 1,400 elements. Page builders often create deeply nested markup; a mega menu or long product grid can add thousands of nodes.
  • Avoid layout thrashing: do not read layout properties such as offsetHeight right after changing styles in a loop. Batch reads, then writes.
  • Use content-visibility: auto on long off-screen sections so the browser skips rendering them until needed.
  • Animate with transform and opacity only.
.long-section { content-visibility: auto; contain-intrinsic-size: auto 800px; }

Improve INP: INP fixes for WordPress

  • Remove plugins that add front-end JavaScript you do not need, such as sliders on pages without sliders.
  • Use a performance plugin's "delay JavaScript until interaction" feature for trackers and chat, but test menus and forms afterwards.
  • Avoid heavy page builders on key templates, or use their optimised DOM output settings.
  • WooCommerce: disable cart fragments on pages that do not show the mini cart.

Improve INP: frequently asked questions

What replaced First Input Delay?

INP replaced FID as a Core Web Vital on 12 March 2024. FID only measured the delay of the first interaction; INP measures the whole visit.

Why does Lighthouse not show INP?

Lighthouse loads the page without real interactions. Use Total Blocking Time as a lab indicator and field data for the real INP.

Is INP worse on mobile?

Usually yes. Mid-range phones have much slower processors, so the same JavaScript takes several times longer.

Related guides: Why Website Speed Matters and How to Make Your Site Faster, How to Get Your Website on Google and 301 vs 302 Redirects.

For official guidance, see web.dev by Google.

Need your INP fixed?

Our speed optimization team profiles real interactions and fixes the scripts behind slow INP. Also read our guides on fixing CLS and improving LCP, or contact us.

Written by the ItsWebExpert team, a web design and development company in Karachi building websites, online stores and apps for businesses across Pakistan.

Ask a Question on WhatsApp

Let's Build Your
Next Website

Tell us what you need and we will reply within 24 hours with honest advice and a fixed quote.

Trusted by our clients, rated 5.0 on Google

5.0 11 Google reviews Read all →
I had a great experience working with Waqas and his team. We got some website development and SEO work done, and I'm quite satisfied with the overall results. They understood our requirements, suggested improvements, and handled the work professionally. What I appreciated most was their communication, attention to detail, and willingness to make changes whenever needed. Waqas is very cooperative, and the team knows what they're doing. Definitely a good choice for anyone looking for reliable web development and digital marketing services.
HUHafiz Ubaid Google review · Nov 2026
I was referred to their company by someone, and I'm really glad I connected with them. Waqas, the CEO, is a very humble and professional person who leads his team exceptionally well. Their expertise in digital marketing, web development, and custom development services is impressive. The team is skilled, responsive, and committed to delivering quality work. Had a really positive experience working with them. Highly recommended!
MRMuhammad Rafeeq Google review · Nov 2026
I had hired them for my client's task of Custom Wordpress plugin development. and many other tasks later on.. Waqas is super fast and sharp.. I know him since 2019.. I really really appreciate his work. Highly recommended..
RFRaheela Farooqui Google review · Nov 2026
I had a positive experience working with Waqas and his team. They provided excellent support with graphic design and social media management. The team was professional, responsive, and attentive to our needs. They understood our vision and delivered quality work on time. Highly recommended for anyone looking for creative and reliable digital services.
URUsman Rock Google review · Nov 2026
I really appreciate their dedication and professionalism. They have a good understanding of SEO, social media marketing, and online brand growth. Communication is smooth, and the quality of work is impressive. Definitely a great team to work with!
SSSameer Sarafaraz Google review · Nov 2026
I've had a great experience working with their team. They understand digital marketing very well and know how to improve online visibility through effective SEO and marketing strategies. Professional, responsive, and reliable. Highly recommended! 🙌❤️
MNMohammad naveed Google review · Nov 2026
I had a really good experience with web Experts. Everything was easy to understand, well-organized, and user-friendly. I appreciate the effort and attention to detail that has gone into creating this platform. It was a smooth and pleasant experience, and I would definitely recommend it to others. Keep up the great work!
SSShazia shaikh Google review · Nov 2026
Extremely professional and committed I am Extremely happy to work with them I wish them best of luck Best Regards M. Salman Farooqui
SFSalman Farooqui Google review · Nov 2026
Outstanding experience! Quality, professionalism, and customer service are all excellent. Keep up the great work!
ARabdul rehman Google review · Nov 2026
Excellent service and a great experience. The team is professional, helpful, and dedicated. Highly recommended!
MEmustafa emb Google review · Nov 2026