Improve INP Metric in Banner Interactions
complete
A
Arkadiusz Seidel
We have identified that our cookie-script banner is currently experiencing excessively long Interaction to Next Paint (INP) times, which significantly affects user experience and SEO performance.
The INP metric is a critical performance indicator that measures the delay between user interactions and the subsequent visual response. Long INP times can lead to user frustration, higher bounce rates, and ultimately, a negative perception of our website's quality. In addition, this can also lower SEO performance, as the INP metric is one of Core Web Vitals used by Google as a ranking factor.
The simplest way, especially during simple rejection or acceptance of cookies, would be to allow the banner to close before running resource-intensive JS work. This could be achieved by using a zero-time
setTimeout
(https://web.dev/articles/optimize-inp?hl=en#yield_to_the_main_thread_often). By deferring the execution of non-critical scripts until after the banner has been closed, we can ensure that the interaction is smooth and immediate.C
CookieScript
complete
Done: https://cookiescript.canny.io/changelog/new-features-sharing-to-multiple-users-and-inp-optimization
C
CookieScript
in progress
T
Thomas
under review
A
Arkadiusz Seidel
Note that the currently observed times are in the range of over 700ms on some mobile devices. Also testing on Chrome DevTools using 6x CPU slowdown yields similar results.