Home › Forums › Pro Support › Preload key requests
Tagged: Performance
- This topic has 5 replies, 4 voices, and was last updated 2 years, 8 months ago by
elvin.
-
AuthorPosts
-
October 28, 2020 at 3:40 am #21802
Rolandas
ParticipantHi
Google PageSpeed Insights test result:
Opportunity > Preload key requests >URL …fonts/wp-show-posts.ttf?ka575c(www.sisla.lt) – Potential Savings 630 ms or 930 ms
I use GP PRO.
Is it possible to do anything?October 29, 2020 at 4:23 am #21876David Beckwith
ParticipantHi there,
you can try hooking a preload link into the WP_head hook:
<link rel="preload" href="Font URL Showing in PageSpeed" as="font" crossorigin="anonymous">
October 29, 2020 at 9:34 am #21894Rolandas
ParticipantThanks David
It seems to work 🙂
I added Font ULR with a weird ending?ka575c
<link rel="preload" href="https://www.sisla.lt/wp-content/plugins/wp-show-posts-pro/fonts/wp-show-posts.ttf?ka575c" as="font" crossorigin="anonymous">
If not added: ?ka575c
Google PageSpeed Insights test result:
Warnings: Lighthouse was unable to automatically check thefont-display
value for the origin https://www.sisla.lt.November 5, 2020 at 1:53 am #22234David Beckwith
ParticipantGlad to hear that!
January 11, 2021 at 4:21 am #25269Charbel
ParticipantHello @diggeddy,
Hope all is well.
Please note that I have followed exactly what you noted above, but Google is still complaining about this font:
Here is the wp_head Hook that I created under Elements.
<link rel="preload" href="http://wpcharbelnemnomblog.northeurope.cloudapp.azure.com/wp-content/plugins/wp-show-posts-pro/fonts/wp-show-posts.ttf?ka575c" as="font" crossorigin="anonymous">
What is the Display Rules that should be set for this Hook?
I am getting this error for my homepage, because I enabled Social ICONs for WP Show Posts PRO.Please note that I am using Font Awesome plugin that you recommended which has now SVG icon instead of using Web Font.
I was able to place the social icons in the Main Menu using SVG, and this helps to get rid of this warning: text remains visible during webfont load.
Could you please advise if we could use SVG for the social icons in WP Show Post PRO instead?Thank You!
-CharbelJanuary 12, 2021 at 2:23 am #25316elvin
ModeratorHi there,
Please note that I have followed exactly what you noted above, but Google is still complaining about this font:
Here is the wp_head Hook that I created under Elements.
<link rel=”preload” href=”http://wpcharbelnemnomblog.northeurope.cloudapp.azure.com/wp-content/plugins/wp-show-posts-pro/fonts/wp-show-posts.ttf?ka575c” as=”font” crossorigin=”anonymous”>
Let’s try a different approach. See my reply on your topic here:
Please note that I am using Font Awesome plugin that you recommended which has now SVG icon instead of using Web Font.
I was able to place the social icons in the Main Menu using SVG, and this helps to get rid of this warning: text remains visible during webfont load.
Could you please advise if we could use SVG for the social icons in WP Show Post PRO instead?You can try applying your font awesome font-family name SVG url on this CSS:
.wpsp-twitter:before { font-family: 'your font family here'; content: url(your_twitter_svg_file_here.svg); } .wpsp-facebook:before { font-family: 'your font family here'; content: url(your_facebook_svg_file_here.svg); }
-
AuthorPosts
- You must be logged in to reply to this topic.