What is Interaction to Next Paint (INP) & How to improve it ?


Manpreet Singh Bedi

Tue Jul 25 2023

Interaction to Next Paint (INP) is a web performance metric that measures user interface responsiveness. Specifically, it measures how much time elapses between a user interaction like a click or key press and the next time the user sees a visual update on the page. A low INP means that the page was consistently able to respond quickly to all—or the vast majority—of user interactions.
INP is a pending Core Web Vital metric that will replace First Input Delay (FID) in March 2024. A good INP score is 200 milliseconds or less. If your page's INP score is higher than that, you may want to take steps to optimize it.
In this blog, we will explore Interaction to Next Paint (INP) in detail, comparing it with FID, and delve into ways to identify and fix INP issues on websites. We'll also provide real-world case studies and practical strategies to optimize website performance and enhance user experiences.
INP vs. First Input Delay (FID)
Interaction to Next Paint (INP) and First Input Delay (FID) are two web performance metrics that measure user interface responsiveness. However, there are some key differences between the two metrics.
  • INP measures the time it takes for a page to respond to a user interaction and update the UI.FID, on the other hand, only measures the time it takes for a page to become interactive after it has loaded.
  • INP takes into account the visual feedback that a user receives after an interaction. FID does not measure visual feedback, which is why it is not as accurate a measure of user experience. properly.
  • INP is a more comprehensive metric than FID. It measures all user interactions, not just the first one. This makes INP a better predictor of how users will perceive the responsiveness of a page.
In March 2024, INP will replace FID as a Core Web Vital metric. This means that INP will become more important for web developers who want to create high-performing websites. Here is a table that summarizes the key differences between INP and FID:
MetricMeasuresTakes into account visual feedbackMore comprehensive
INPTime to respond to a user interaction and update the UIYesYes
FIDTime for a page to become interactive after it has loadedNoNo
Google Email: Core Web Vitals INP issue detected on your website
Google has recently started sending out emails to site owners who have websites with low Interaction to Next Paint (INP) scores. The emails have the subject line ''Core Web Vitals INP issues detected on your site'' and list the site domain that has the issue.
The email from Google will provide you with some information about your INP score, including the average INP score for your site, the number of pages with low INP scores, and the URLs of the pages with low INP scores.
We will discuss common causes of INP issues and steps to improve it in the following sections.
Finding INP Issues on a Website
There are a number of factors that can contribute to a bad INP score. Some of the most common causes include:
  • Large JavaScript files:JavaScript files that are too large can take a long time to load, which can slow down the page and impact INP.
  • Heavy event-handling JavaScript: JavaScript that is used to handle user events, such as clicks and scrolls, can also be a cause of bad INP. If this JavaScript is not optimized, it can block the main thread and delay the response to user interactions.
  • Slow network connections: If your website is hosted on a slow server or if your visitors are on a slow network connection, this can also contribute to a bad INP score.
  • Poorly optimized images:Large or poorly optimized images can also slow down the page and impact INP.
  • Inefficient rendering:If your website's rendering is inefficient, this can also lead to a bad INP score.
Common Causes of INP Issues
There are a few ways to identify INP issues on a website. Here are a few methods:
  • Use the Search Console Core Web Vitals report:The Search Console Core Web Vitals report provides you with information about your website's INP score, including the average INP score for your site, the number of pages with low INP scores, and the URLs of the pages with low INP scores.
  • Use a web performance tool: There are a number of web performance tools that can help you identify INP issues on your website. Some popular tools include Lighthouse, WebPageTest, and GTmetrix.
  • Use the Chrome DevTools: The Chrome DevTools can be used to diagnose INP issues on your website. You can use the Performance tab to monitor the performance of your page and identify any bottlenecks that may be contributing to a high INP score.
  • Use a RUM (Real User Monitoring) tool:RUM tools can help you track the performance of your website from the perspective of real users. This can be helpful for identifying INP issues that may not be apparent in lab tests.
Strategies to Improve INP
There are a number of strategies that can be used to improve INP. Some of these strategies are more beginner-friendly, while others require more advanced knowledge of web development.
  • Reduce the size of your page's JavaScript and CSS files.This can be done using a tool like minifier.
  • Use a CDN to deliver your page's assets. This will help to ensure that your page's assets are loaded from servers that are close to your visitors.
  • Caching your page's resources. This will help to reduce the number of times that your visitors have to download the same assets.
  • Using a lazy loading library.This will help to load images and other resources only when they are visible to the user.
Advanced INP Optimization Techniques
  • Avoid using third-party scripts that are not essential.These scripts can often add a lot of latency to your page.
  • Use a content delivery network (CDN). A CDN can help to deliver your page's assets from servers that are closer to your visitors, which can improve performance.
  • Optimize your images. Optimizing your images can reduce their file size, which can improve performance. Lazy loading images will only load images when they are visible to the user, which can improve performance.
  • Optimize font delivery. Adding too many libraries and fonts can slow down the website. Ensure you only add the required font libraries.
Leospeed : Improve the INP
Leospeed offers a range of automatic optimizations that effectively improve your INP (Interaction to Next Paint) and overall website performance.
  • CSS: Compression, Minification, Lazy Loading, Critical Path Extraction
  • Javascript: Javascript lazy loading and compression.
  • Image: Compression, WebP Conversion, Size Reduction, Lazy Loading
  • Iframe & Fonts: Lazy loading
  • HTML: Gzip / Brotli Compression, Minification
  • CDN: Loads all assets from CDN, Smart Caching Policy
  • Number of Requests: Automatically reduce number of requests for better performance.