Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce cookie banner delay to improve LCP #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jethroflanagan
Copy link
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
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

@@ -71,5 +71,5 @@
}
)

setTimeout(loadCookieBanner, 3000);
setTimeout(loadCookieBanner, 1);
Copy link
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
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