SSL Labs ScoreSecurityHeaders.io ScoreHSTS Preloaded

Log in to participate

There is no cost to join RicheyWeb, and membership is a requirement to submit bug reports and participate in the support forums.

Google fonts preconnect

More
2 weeks 4 days ago #34287 by jjnxpct
Hi!

When we want to load a Google font using head tags we now need to add an additional tag (as suggested by Google) before the Google font stylesheet to load the font faster.

For example Google gives us this code to add:
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Vollkorn:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet" type="text/css" />

The preconnect link tag should be before the Google font CSS.

I tried to add a custom tag '<link rel="preconnect" href=" fonts.gstatic.com ">' to the headtag plugin, but this tag is loaded after the CSS tags.

Is there a way to get this loaded in the right order using the HeadTag plugin so the preload tag comes before the Google Font CSS tag?

Kind regards,
Jip

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago #34288 by jjnxpct
Replied by jjnxpct on topic Google fonts preconnect
Or maybe it's not an issue when the preconnect link tag is load later in the <head>?

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Powered by Kunena Forum