Current time: 03-01-2021, 12:04 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fonts preloading
01-19-2021, 07:32 PM
Post: #1
Fonts preloading
Hello,

I'm optimizing my site indoor2outdoor.com and cannot pass the Google Page Speed ​​"Preload key requests" check. Namely, Google points to preloading fonts. I added all the fonts that are used on the page for preloading, but the error persists. Checking the page in Webpagetest or GTmetrix shows that the same fonts are loaded twice for some reason. I cannot understand why this is so. Could you suggest how can I see which page elements/blocks are loading fonts? Also, I will also be grateful for any help in resolving this issue.
Find all posts by this user
Quote this message in a reply
01-20-2021, 01:10 AM
Post: #2
RE: Fonts preloading
Do you have a link to a test result? Loading twice is usually because of crossorigin. You need to add crossorigin to font preloads if they are coming from a different domain otherwise the preloaded version can't be used.

https://developer.mozilla.org/en-US/docs...ed_fetches
Visit this user's website Find all posts by this user
Quote this message in a reply
01-20-2021, 07:42 AM
Post: #3
RE: Fonts preloading
They also need to have the same version number/query suffixed to the URL. That's probably what's happening here, if you are referring to the /wp-content/themes/disto/css/fonts/fontawesome-webfont.woff2 request that's preloaded.

Preloaded request:
wp-content/themes/disto/css/fonts/fontawesome-webfont.woff2

Request from CSS file forcing a redownload:
wp-content/themes/disto/css/fonts/fontawesome-webfont.woff2?v=4.5.0
Visit this user's website Find all posts by this user
Quote this message in a reply
01-22-2021, 06:48 AM
Post: #4
RE: Fonts preloading
Thanks, guys. Seems like specifying the font version helped. But another question arose. I don't understand why there is a loading gap between 1.4 and 1.7 sec. Could it also be related to font loading? I thought when redownloading of fonts was eliminated, the next downloads would shift in time ..
I also enabled Rocket Loader in Cloudflare, which seemed to give some page speed up. But maybe because of this the gap appeared?
Could you help with this please as well?
Here is the link to a test result
https://www.webpagetest.org/result/21012...view_step1
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)