FontAwesome Slow Loading on 3.61

4 posts by 2 authors in: Forums > CMS Builder
Last Post: October 19, 2023   (RSS)

By KennyH - October 12, 2023

I have upgraded all of my installations to 3.61 and I am noticing that on the front-end, fontawesome icons are showing squares and then loading a second or two after that. In the CMSB, the same thing happens but the text font also appears one way (taller) and then a second or two later it changes to the recognized font I have always seen.

On the front-end of the website, I use the minified css for fontawesome 6 pro (hosted locally - all.min.css)

So I have access to all of the icons available in fontawesome, I have modified lib/menus/header_css.php to not use the locally hosted fontawesome-free and to use one of my CDN kits from fontawesome using

<script src="https://kit.fontawesome.com/xxxxxxxxx.js" crossorigin="anonymous"></script>

This kit is only used my CMSB installations and not on the front-end since those are locally hosted. Both are running the latest version of 6.4.2

Has anything changed with 3.61 that might be causing an issue - especially if we are trying to load two different versions of FontAwesome?  How does this affect icons that are coded into the HTML and not tied to CMSB?

At risk of sending anyone down a rabbit hole, I only ask this since I have checked everything else I know to check and this only occurred after the upgrades. Should I being doing something different for lib/menus/header_css.php?

Kenny H

By Dave - October 15, 2023

Hi Kenny, 

Thanks for reporting this.  We recently added this to the top of /lib/menus/header.php

    // show headers - prevent caching of CMS pages
    header('Content-type: text/html; charset=utf-8');
    header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
    header('Pragma: no-cache');
    header('Expires: 0');

Could you try commenting out the bottom 3 lines and see if it makes a difference? 

Also, does the issue occur when you're not using a custom FontAwesome library?

Let me know some details and we'll try to help figure it out.

Thanks!

Dave Edis - Senior Developer
interactivetools.com

By Dave - October 19, 2023

Hi Kenny, 

Okay, interesting.  If you can find a sample site where it occurs consistently you could send us the FTP & CMS login and we could take a look. It could be a combination of the headers being sent from various places.  If there's a way we can prevent it from CMSB we'd want to do that.

One way to check in Chrome is to open the Inspection Panel (Ctrl-Shift-i or equivalent) and then click on the network tab.  If you go to a CMSB page and reload it will list all the files loaded.  Under the "size" column it will show bytes loaded or "(memory cache)".  Mine shows everything but the PHP file being loaded from the (memory cache) unless I force reload (ctrl-F5).

Feel free to send us a site in a 2nd level support ticket if you'd like us to take a look.

Cheers!

Dave Edis - Senior Developer
interactivetools.com