Celebrating 7 Years! Get up to $30 off GeneratePress Premium!

[Resolved] generatepress.woff2 font performance issue

Home Forums Support [Resolved] generatepress.woff2 font performance issue

Home Forums Support generatepress.woff2 font performance issue

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1764427
    Andre

    Hi there!

    In my GTmetrix waterfall I always get a red canceled status and a huge waiting time for the object “generatepress.woff2”.

    I understand this is something about the Generate Press theme fonts but I don’t know what is the problem, what’s causing it and how to fix it. I cant really understand the details.

    In my caching plugin (SG Optimizer from SiteGround) I apparently have this font preloading (I believe this was done automatically by the plugin.

    In Customizer, I have General Icon Type set to SVG. I’ve done that today along with Flexbox structure, but the issue was happening before this change.

    Can you help me understand and fix this issue?

    Thanks,

    André

    PS – I’m sending GTmetrix analyze link and a screenshot in private.

    #1764514
    Elvin
    Staff
    Customer Support

    Hi there,

    I understand this is something about the Generate Press theme fonts but I don’t know what is the problem, what’s causing it and how to fix it. I cant really understand the details.

    It is, it’s the font-based icon.

    In Customizer, I have General Icon Type set to SVG. I’ve done that today along with Flexbox structure, but the issue was happening before this change.

    This is actually the fix for this. Turning the icons into actual SVGs makes it immune to FOUT.

    A wise man once said:
    "Have you cleared your cache?"

    #1764523
    Andre

    Hi Elvin,

    Thanks for your reply.

    I didnt quite understand what you mean by “Turning the icons into actual SVGs makes it immune to FOUT”, sorry… 🙂

    Having set the icons type to SVG, shouldnt the generatepress.woff2 stop loading and not show in the Waterfall?
    https://tinyurl.com/yjqhpq7k
    https://gtmetrix.com/reports/www.tempodeviajar.com/D2RbN69r/

    Should I remove this font from preloading in my cache plugin?
    https://www.awesomescreenshot.com/image/7917719?key=e2d01b77a2ed996d36b74230bc78a754

    Thanks,

    André

    #1764587
    Elvin
    Staff
    Customer Support

    It’s quite strange that the font file is still being requested even when the icon type is set to SVG.

    Can you tell us what version of WordPress, GeneratePress and GP Premium are you used? So we could set up a sandbox site and replicate the issue.

    A wise man once said:
    "Have you cleared your cache?"

    #1764598
    Andre

    Thanks!

    WordPress: Version 5.7.1
    GeneratePress: Version 3.0.3
    GP Premium Version: 2.0.1

    #1764613
    Andre

    Not sure if this is relevant but…

    The path I see in the Waterfall and that I have preloading in my caching plugin is:
    tempodeviajar.com/wp-content/themes/generatepress/fonts/generatepress.woff2

    But the path I have to go to find the font in my File Manager is:
    tempodeviajar.com/public_html/wp-content/themes/generatepress/assets/fonts/generatepress.woff2

    #1765219
    David
    Staff
    Customer Support

    Hi there,

    you mentioned:

    Should I remove this font from preloading in my cache plugin?

    Did you remove that – as i can still see the preload request being made. Can you remove it?

    #1765257
    Andre

    Hi David!

    I did not remove it before, as I was waiting for your feedback on that. It’s removed now and the error is gone from the Waterfall view:
    https://gtmetrix.com/reports/www.tempodeviajar.com/NgseutEn/
    https://gtmetrix.com/reports/www.tempodeviajar.com/8cjBKb0T/

    Can you please double check and let me know if the issue is fixed or if there’s anything else I should do?
    (looks good to me, but…)

    If I understood correctly, the problem was that the font was being preloaded via caching plugin and, on top of that, I guess the path was wrong?

    tempodeviajar.com/wp-content/themes/generatepress/fonts/generatepress.woff2
    vs
    tempodeviajar.com/public_html/wp-content/themes/generatepress/assets/fonts/generatepress.woff2

    Thanks for your help,

    André

    #1765335
    David
    Staff
    Customer Support

    Thats correct now – the site is no longer making that request.

    The GP /assets folder is where all the themes assets are located. But they are never directly loaded on the Front End from that URL.
    When the Icons are set to Font – GP loads the fonts into the /fonts folder and enqueues that font.
    When you change the Icon to SVG it removes the font from the /fonts folder.

    So you’re preloader was trying to load a font file that is no longer in that location 🙂

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.