Site logo

Archived topic

rel=preload for 3rd party plugin not working

9 replies · Started by Andrew on October 15, 2020

Viewing posts 1–10 of 10

Google PageSpeed Insights suggests I preload a font from a lightweight social icons plugin.

Following guidance found on this forum I created a Hook element in wp_head across the entire site with the code:

<link rel=”preload” href=”/wp-content/plugins/lightweight-social-icons/fonts/fontello.woff″ as=”font” type=”font/woff2″ crossorigin>

For some reason it doesn't seem to do anything - PageSpeed keeps providing the same advice about preload even with this script, suggesting the script isn't working.

Any ideas if I have done something wrong?

Thanks

Hi there,

can you share a link so i can take a look?

Of course, sorry, should have done that initially. It's https://tarsolutions.co.uk

Please advise if you need access to the back end.

Try updating the URL in your pre-load link to include the full address ie.

https://tarsolutions.co.uk/wp-content/plugins/lightweight-social-icons/fonts/fontello.woff

For some reason it doesn't seem to work. The tag does appear in the head section of the site but for whatever reason doesn't seem to do very much.

I am not seeing the full URL in the link tag ?

I've got it. Something stupid actually so apologies for the time waste. I copied the initial code and altered the URL. But the copy paste produced dodgy quotation marks. Now fixed. Thanks for your time and assistance.

https://imgur.com/Acht00Z

Yeah curly quotes are a pain ... glad to hear you got it resolved (?)

Yes, all sorted. Thanks for your time, you certainly helped push me in the right direction.

You're welcome

This archived topic is closed to new replies.