Site logo

Archived topic

Hook Element doesn't remove Preload Key Requests warning

7 replies · Started by John on April 23, 2021

Viewing posts 1–8 of 8

Hi GP,

I use Tom's older plug-in (Lightweight Social Icons) on my website. It uses the Fontello font which PageSpeed Insights is flagging me to preload it.

So I created this hook element in wp_head:

<link rel="preload" href="https://www.yourdomain.com/wp-content/plugins/lightweight-social-icons/fonts/fontello.woff" as="font" type="font/woff" crossorigin>

And under "Display Rules", selected "Entire Site" for Location.

The error is still showing in PSI though. Help please.

Thanks,
John

Hi there,

can you share a link to your site so we can see whats happening.

Hi David,

The site link is included in my original post.

Thanks,
John

Sorry - must get my eyes tested :)

The URL in the <link> is wrong:

https://www.yourdomain.com/wp-content/plugins/lightweight-social-icons/fonts/fontello.woff

You need to change the top level URL https://www.yourdomain.com/ for your site url.

Opps, I put the default URL when I added the 'crossorigin' at the end. I changed it back, but it's still showing up as not preloaded...

My eyes get tested all the time too apparently :)

Can you look again and see what I'm doing wrong?

In your preload did you leave the www. ? as thats not required.

David - you're the man! Removing the www portion fixed it. THANK YOU!

Glad to be of help!

This archived topic is closed to new replies.