Skip to content

Conversation

@delize
Copy link
Contributor

@delize delize commented Dec 24, 2025

Move font loading from footer JS to head with preconnect and preload hints.

This reduces CLS by ensuring fonts load earlier in the page lifecycle instead of being dynamically inserted after footer loads.

This was noticed while trying to do #1214 and the text kept resizing the layout whenever I would hard refresh. Now the swap isn't as bad when loading the fonts and hard refreshing or on first page load.

Only other way to fix it would be to host the fonts ourselves.

Move font loading from footer JS to head with preconnect and preload
hints. This reduces CLS by ensuring fonts load earlier in the page
lifecycle instead of being dynamically inserted after footer loads.
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.

1 participant