• Resolved vikasbobi

    (@vikasbobi)


    Hi there,
    Thanks for your plugin.
    With the help of your plugin was able to preload few fonts but still not able to understand how to preload fonts.gstatic shown in waterfall of gtmetrics https://prnt.sc/vwum5p.
    Pls explain or send link to understand how to work with fonts.gstatic.
    Thanks

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @vikasbobi when you’re loading fonts by referring CSS files from fonts.googleapis.com the font files are loaded from fonts.gstatic.com. The problem comes when you preload the fonts, but Google changes their paths from the file loading within fonts.googleapis.com.

    For instance, take a look at the CSS content from the following URL: https://fonts.googleapis.com/css?family=Source+Sans+Pro – one of fonts loaded is https://fonts.gstatic.com/s/sourcesanspro/v14/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNa7lujVj9_mf.woff2 – you decide to preload it. Later on, when you access the same CSS URL, there will be a different path for the same font-weight or style.

    So, you either have to constantly check the fonts.googleapis.com URLs in case the fonts were updated. Or, via manual coding, load those CSS contents locally and you will know you will always load and preload the same font files (even if Google releases new versions of them).

    At the moment, there’s no such feature in Asset CleanUp (there will be soon) that will download the CSS and font files from Google and reference them locally.

    I hope it helps! Let me know if I can further assist you!

Viewing 1 replies (of 1 total)

The topic ‘fonts.gstatic’ is closed to new replies.