Skip to content

Reduce cookie banner delay to improve LCP#13

Open
jethroflanagan wants to merge 1 commit intomasterfrom
fix/cookie-banner
Open

Reduce cookie banner delay to improve LCP#13
jethroflanagan wants to merge 1 commit intomasterfrom
fix/cookie-banner

Conversation

@jethroflanagan
Copy link
Copy Markdown
Contributor

Why: Core Web Vitals LCP (largest contentful pain) score might be affected by the delayed paint of the cookie banner.

What: Reduced cookie banner timeout, but kept it there to delay it after other scripts

Copy link
Copy Markdown
Contributor

@michael616kriel michael616kriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just that one comment otherwise looks good

)

setTimeout(loadCookieBanner, 3000);
setTimeout(loadCookieBanner, 1);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jethroflanagan is not worth just removing the setTimeout if it's like only 1ms?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michael616kriel It should stay as it needs to be removed from the initial render loop, just as a performance thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants