AnonymousFeb 02, 2024
Google has introduced a new metric called Interaction to Next Paint (INP) that measures how quickly your website responds to user interactions. In March 2024, it will be one of the Core Web Vitals metrics that affects Google rankings.
In particular, Google replace First Input Delay (FID) in March 2024 with Interaction to Next Paint (INP).
So What is Interaction to Next Paint, How is it different from FID, and what can be done to make it better ? I will guide you all in this post.
Interaction to Next Paint (INP) is a responsiveness metric from Google that measures how quickly your web page responds to user interactions.
It specifically focuses on the time it takes for a user's input to result in a visual response on the screen.
Low INP detracts from the user experience, which raises the possibility of a higher bounce rate and, eventually, lost sales.
The term interaction in the context of INP refers to any user action that triggers a change on the webpage. These interactions can include:
In summary, an interaction encompasses any activity that engages with the webpage and prompts a visual change. The goal is to ensure that these interactions happen smoothly and without noticeable delays for an optimal user experience!
Let’s compare First Input Delay (FID) and Interaction to Next Paint (INP):
1. First Input Delay (FID):
2. Interaction to Next Paint (INP):
In summary, both FID and INP contribute to a better user experience by reducing delays and providing responsiveness. While FID focuses on the initial interaction, INP considers subsequent visual updates. Web developers should aim to optimize both metrics for optimal performance!
An Interaction to Next Paint (INP) score measures how quickly a webpage responds to user interactions. It’s an essential metric for assessing web performance. Here are the thresholds for INP scores:
Remember, a lower INP indicates better responsiveness, enhancing the overall user experience!
In March 2024, INP will take the place of FID as one of Google's three Core Web Vitals metrics. The other two metrics are Cumulative Layout Shift, which determines whether the page layout remains stable after loading, and Largest Contentful Paint, which gauges how quickly a page's main content appears.
According to Google, 90% of a user's time on a page is spent after it loads, based on Chrome usage data. This means that measuring the delay until the first event on a page (FID) is insufficient; instead, we must measure the delay for each interaction that takes place (INP).
Essentially, FID lost its ability to measure delays, which meant it was less accurate in identifying negative user experiences.
A few tools are available for measuring Interaction to Next Paint, such as:
The web-vitals library can be used to measure INP programmatically in JavaScript. By doing this, you can get measurements from actual users and provide them back to your analytics company.
Using a script tag, you can load the library in this way:
<script src="https://unpkg.com/web-vitals@3/dist/web-vitals.iife.js">
You can then use the onINP method on the webVitals object to see when the Interaction to Next Paint value changes.
webVitals.getINP(function (info) {
console.log(info)
}, { reportAllChanges: true });
By calling a designated function just prior to the subsequent repaint, the browser is informed that you want to perform an animation through the use of the requestAnimationFrame method.
Before the next frame can be shown, the requestAnimationFrame() callback, which is a component of the event loop's rendering phase, must be completed. It is important to realise that you may be delaying the rendering of the next frame if you are using requestAnimationFrame() for tasks unrelated to UI changes.
Rendering times may be slowed down by intricate layouts with nested elements. To enhance rendering performance, reduce superfluous nesting and simplify your page structure. Furthermore, take note of layout thrashing, which occurs when reflows are triggered repeatedly by frequent changes to element dimensions. Combine batch updates to reduce layout thrashing and improve efficiency.
Although client-side rendering (CSR) can offer dynamic and interactive experiences, if not used carefully, it may have an adverse effect on performance. Depending on your particular use case, strike the ideal balance between server-side rendering (SSR) and CSR. Make use of methods such as caching, code splitting, and effective data fetching to maximise performance when rendering on the client side.
Remain up to date on the most recent recommendations for optimising websites and best practices.
Keep abreast of Google's performance improvement guidelines and Core Web Vitals.
Optimising a website's performance is a continuous process. As a result, you must constantly review and learn how to improve your website's INP and other CWV metrics.
First Interaction Delay (FID) will be replaced in 2024 by a new Core Web Vitals metric called Interaction to Next Paint (INP). It shows you how quickly a user engages with your website. Less time between events improves performance.
Since Google's ranking algorithm takes Core Web Vitals into account, I highly advise you to optimise your INP by lowering CPU processing on your website by implementing the above-mentioned strategies.
While you're at it, check out my other recommendations for speeding up your website and enhancing user experience, as well as Core Web Vitals.