Skip to content
Wladimir Ming
Web performance

Improving INP: a practical guide for online stores

What INP measures, why product, cart and filter pages often fail it, and a step-by-step way to find and fix slow interactions in an online store.

By Wladimir MingPublished 8 min read
Oscilloscope-style diagram of one click: on top, a long red task delays the next frame past the 200 ms line; below, the work is split, the visible update is painted well before 200 ms and the rest runs afterwards.

Interaction to Next Paint (INP) measures how quickly a page visibly responds when someone clicks, taps or presses a key. In an online store, those moments are the ones that matter: choosing a size, opening a filter, adding to basket. To improve INP, find the interactions that are slow for real visitors, then reduce the JavaScript work that runs before, during and after each one.

This guide is for owners and developers of small and mid-sized shops. It explains the metric in plain terms, shows where stores usually lose time and gives a repeatable way to fix it.

What INP measures, in one paragraph

INP observes every click, tap and key press during a visit. For each one it measures the time from the user's action until the browser paints the next frame, the moment the shopper sees something happen. The page's INP is roughly its slowest interaction, with a few outliers ignored on very busy pages. Scrolling and hovering do not count. According to web.dev (opens in a new tab), the thresholds are:

INP at the 75th percentileRating
200 ms or lessGood
Over 200 ms, up to 500 msNeeds improvement
Over 500 msPoor

The 75th percentile is measured separately for mobile and desktop, using real visits. INP is one of the three Core Web Vitals, alongside LCP and CLS. If you need a refresher on all three, read Core Web Vitals explained.

Why online stores struggle with INP

Stores are heavy on interaction and heavy on scripts. That combination is exactly what INP punishes. The usual suspects are:

  • Variant pickers. Selecting a colour or size often triggers price, stock, image gallery and URL updates in one go.
  • Add to basket. A click can fire the cart update, a mini-cart drawer, analytics events, ad pixels and a recommendations widget, all on the main thread.
  • Faceted filters. Ticking a filter on a category page may re-render dozens of product cards at once.
  • Search-as-you-type. Each key press can trigger filtering and re-rendering of suggestions.
  • Third-party scripts. Chat widgets, review apps, personalisation, A/B testing and marketing tags compete for the same main thread as your own code.
  • Large pages. Long category pages and mega menus create a big DOM, which makes every visual update more expensive.

None of these is a problem in itself. They become a problem when too much work runs at the wrong moment.

The three parts of a slow interaction

web.dev splits every interaction into three phases. Knowing which one is slow tells you what to fix.

  1. Input delay: the time before your event handlers can even start. It is long when the main thread is busy with something else, often scripts still loading or a third-party tag running.
  2. Processing duration: the time your event handlers take to run. It is long when a click does too much work synchronously.
  3. Presentation delay: the time from the end of your handlers until the browser paints. It is long when the update forces a lot of style, layout and rendering work, often because the DOM is large.

A long task is any task that keeps the main thread busy for more than 50 ms (web.dev (opens in a new tab)). While a long task runs, the browser cannot respond to the shopper.

Step 1: find the slow interactions with field data

Start with real users, not a lab score. Lab tools like Lighthouse load the page without clicking anything, so they cannot measure INP directly.

  • PageSpeed Insights shows Chrome UX Report (CrUX) field data for the URL or the whole origin, when there is enough traffic.
  • Google Search Console has a Core Web Vitals report that groups URLs with similar problems, such as all product pages or all category pages.
  • Real user monitoring (RUM) tells you which interaction was slow and on which element. Google's open-source web-vitals library (opens in a new tab) can collect INP from real visits and send it to your analytics.

CrUX tells you that a template is slow, but not why. If your store has little traffic, field data may be missing. In that case, test the key flows manually, as described next.

Step 2: reproduce the problem in the lab

Open Chrome DevTools, go to the Performance panel and enable CPU throttling to simulate a mid-range phone. Then:

  1. Record while you perform the slow interaction: pick a variant, add to basket, apply a filter.
  2. Repeat it while the page is still loading. web.dev notes that interactions during load are often the slowest, because the main thread is busiest then.
  3. In the recording, look for long tasks (marked in red) around your click and check which scripts they belong to.

Note the phase that dominates. A long gap before your handler starts points to input delay. A long handler points to processing duration. Long purple "Layout" or "Recalculate Style" blocks after the handler point to presentation delay.

Step 3: fix by phase

Reduce input delay

  • Audit third-party scripts. List every tag and app, who owns it and whether it is still needed. Remove what nobody uses. Load the rest later, for example after the page has become interactive.
  • Split and defer your own JavaScript. Load only what the current page needs. Code for reviews, wishlists or recommendations can load when it becomes visible or is first used.
  • Avoid big startup tasks. Long script evaluation at load blocks early clicks.

Reduce processing duration

Do the visible update first, then let the rest wait. web.dev recommends yielding to the main thread so the browser can paint between chunks of work:

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

async function onAddToBasket(product) {
  showBasketFeedback(product);   // visible change first
  await yieldToMain();
  await updateCart(product);     // network and state
  await yieldToMain();
  sendAnalyticsEvents(product);  // non-urgent work last
}

scheduler.yield() is not available in every browser, so keep the setTimeout fallback (Chrome for Developers (opens in a new tab)). Other fixes in this phase:

  • Avoid layout thrashing. Reading layout values (like offsetHeight) right after changing styles forces the browser to calculate layout synchronously. Batch your reads, then your writes.
  • Debounce search-as-you-type so filtering runs after a short pause, not on every key press.
  • Move analytics out of the critical path. Tracking an "add to cart" event matters, but it does not need to run before the shopper sees the basket update.

Reduce presentation delay

  • Keep the DOM lean. Rendering cost grows with page size. Paginate or lazy-load long product grids and simplify mega menus.
  • Use content-visibility: auto for long, below-the-fold sections, so the browser skips rendering work for content off screen (web.dev (opens in a new tab)).
  • Update only what changed. When a filter is applied, avoid re-rendering the whole page if only the product list changes.

Platform notes: Shopify, WooCommerce and custom builds

  • Shopify and other hosted platforms: apps are the most common source of extra JavaScript. Review installed apps, uninstall unused ones and check that removed apps did not leave code in the theme.
  • WooCommerce and WordPress: plugins that add scripts to every page, page builders and heavy sliders often add main-thread work. Load scripts only on the pages that need them.
  • Headless and custom builds: framework hydration can create long tasks at load. Server rendering, smaller client components and code splitting reduce that cost.

If you run marketing tags through a tag manager, the same rule applies: every tag is code that runs on the shopper's device. For a UK store, it is also worth checking that tags only fire after consent where required, which also reduces load before consent is given.

How to know it worked

Field data updates slowly. CrUX uses a rolling 28-day window, so a fix may take several weeks to show fully in PageSpeed Insights and Search Console. In the meantime:

  • Re-test the same flows in DevTools with the same throttling settings.
  • Watch your own RUM data, if you collect it, broken down by page template and device.
  • Use the Validate fix button in Search Console's Core Web Vitals report once the change is live.

INP fixes also tend to make the shop feel better to use, which matters more than any score.

INP checklist for online stores

  • Check INP for product, category and cart templates in PageSpeed Insights or Search Console, mobile first.
  • Identify the slowest interactions: variant picker, add to basket, filters, search.
  • Reproduce them in DevTools with CPU throttling, during and after page load.
  • List every third-party script and app, remove unused ones and delay the rest.
  • Show visual feedback first, then yield before heavy or non-urgent work.
  • Batch DOM reads and writes to avoid forced layouts.
  • Reduce DOM size on long category pages and menus.
  • Re-test, then validate the fix in Search Console.

INP is often one of several technical issues on the same pages. If you want a structured review of performance alongside crawling, indexing and structured data, see the technical SEO audit checklist for small online stores or the technical SEO service.

Share on LinkedIn(opens in a new tab)

Need this applied to your site?