Skip to content

Make INP (or TBT) more prominent #2

@kurtextrem

Description

@kurtextrem

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions