• Resolved maxgorky

    (@maxgorky)


    Hey Daan,

    It looks like OMFG is not saving fonts locally. There’s way too many googleapi, gstatic requests. In fact fonts requests make about 60% of overall requests.

    Please check this screenshot https://imgur.com/a/JG4YVPJ

    Anything can be done about it?

    Thank you.

Viewing 15 replies - 31 through 45 (of 47 total)
  • Thread Starter maxgorky

    (@maxgorky)

    So does it mean having those fonts in my Waterfall, your plugin still works? Like before, I had no fonts at all on the Waterfall, but at the same time I had Times New Roman all over the site.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Your fonts are loaded and displayed correctly now. I just checked. If you’re still seeing Times New Roman, it must be a browser cache issue. Try opening your site in a private session.

    And yes, OMGF is now loading the fonts, instead of Google. Which means the plugin is working.

    Thread Starter maxgorky

    (@maxgorky)

    Does it mean having those fonts in my Waterfall, your plugin still works? Like before, I had no fonts at all on the Waterfall, but at the same time I had Times New Roman all over the site.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    You’re asking the same question twice. Does that mean that my answer didn’t suffice?

    Ok, let’s break this up:

    Like before, I had no fonts at all on the Waterfall, but at the same time I had Times New Roman all over the site.

    If you have no fonts in the waterfall, that means that no fonts are loaded. So it makes sense that your browser falls back to Times New Roman. Because it can’t find the actual font that it actually wanted to load. More information about this: https://www.w3schools.com/cssref/pr_font_font-family.asp

    Does it mean having those fonts in my Waterfall, your plugin still works?

    Yes, that means that it works. OMGF removes Google Fonts coming from Google’s servers (fonts.googleapis.com and gstatic.com) from your theme’s header, and adds a locally hosted copy of these fonts.

    I hope this clears things up for you.

    Thread Starter maxgorky

    (@maxgorky)

    I just don’t get it. If I see Google fonts on my Waterfall, does it mean OMFG is not working? So far I can see those fonts. But does it mean they’re served from local or are they still calling Google servers?

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Check the source: instead of fonts.googleapis.com or gstatic.com, you’ll see your own URL. Which means that they’re not calling Google’s servers.

    Thread Starter maxgorky

    (@maxgorky)

    Ok, your above answer resolved the issue. I have those Google fonts in my Waterfall but they are served locally:)

    Thread Starter maxgorky

    (@maxgorky)

    I can see the fonts are served from wp-content/cache/omfg-webfonts/…But it takes up to 1 sec to load them. Is there a way to reduce the timing?

    Thread Starter maxgorky

    (@maxgorky)

    Daan, what makes the difference, serving fonts from Google servers and serving locally, if this takes so much time to serve them anyways?

    @maxgorky with LSCache, you can exclude fonts.css from being combined into the global stylesheet. This will help you isolate the issue without using code.

    As for font loading speed, if you preload the fonts, they should be loaded at the same time as the page, but if it takes a long time for the server to send them, that has nothing to do with the plugin.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Thanks, @galbaras. Yes, @maxgorky, Gal’s answer is completely accurate.

    Thread Starter maxgorky

    (@maxgorky)

    @galbaras how do I exclude font.css in LSCache?

    LiteSpeed Cache > Settings > Tuning > CSS Excludes

    Thread Starter maxgorky

    (@maxgorky)

    Thanks mate. But there’s numerous fields. Which one should I use and what exactly docai put in there? Names of fonts and in what format?

    I appreciate your assistance.

    CSS Excludes is the field on the Tuning tab of the Settings page.

    In it, you can enter the names of stylesheet files, like fonts.css, each on a line.

    This causes the plugin to include those files separately on the page, which allows you to debug, change order of appearance, etc.

    Minification doesn’t handle fonts. They are loaded separately when the browser parses the CSS and sees the need for them. When you preload, however, the browser will trust you and fetch the fonts files earlier.

    To find out what’s initiating the loading of a font, look at the Network tab of your browser’s code inspector, find the font and check the “initiator”. You’re likely to find that when OMGF is active, Google fonts are requested by advertising scripts, chat widgets, etc, but no longer from your site’s theme.

    I hope that’s clear.

Viewing 15 replies - 31 through 45 (of 47 total)
  • The topic ‘Too many font requests’ is closed to new replies.