-
Notifications
You must be signed in to change notification settings - Fork 3
Make INP (or TBT) more prominent #2
Description
A common source of high INP on websites is the cookie banners accept/reject button. E.g. see this case study: https://web.dev/case-studies/pubconsent-inp. The reason is, after accepting (or rejecting in some cases) lots of tracking scripts start running synchronously. This creates long tasks, blocking the main thread and making the INP for the click on the button pretty bad. Especially GTM is a big offender of that, see e.g. the GTM section of my article.
There are lots of implementations that do this right nowadays, but also lots that don't. The correct way to about this is, to yield in the cookie banner implementation - so e.g. before calling any user callbacks, yield, then callback (and then initialize GTM etc.). So I think one success criteria for a good cookie banner is "low INP" or "Yields before callbacks" or something.