FontAwesome Slow Loading on 3.61

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

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 KennyH - October 16, 2023 - edited: October 16, 2023

So far, I think this is working. It has been intermittent depending on which site I go to. I have updated dozens of sites and tested them before and after. On the sites where the slow load occurred, commenting out the cache headers seemed to have fixed the problem (tried it on different browsers and it all loaded as expected).

I am wondering if it was conflicting with my .htaccess directives. In my .htaccess files, I have this:

# Set cache expiration directives
ExpiresActive on
ExpiresDefault "access plus 1 year"

# Images
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"

# Video
ExpiresByType video/webm "access plus 1 year"
ExpiresByType video/mp4 "access plus 1 year"
ExpiresByType video/mpeg "access plus 1 year"

# Fonts
ExpiresByType font/ttf "access plus 1 year"
ExpiresByType font/otf "access plus 1 year"
ExpiresByType font/woff "access plus 1 year"
ExpiresByType font/woff2 "access plus 1 year"
ExpiresByType application/font-woff "access plus 1 year"
ExpiresByType application/font-woff2 "access plus 1 year"

# CSS, JavaScript
ExpiresByType text/css "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"

# Others
ExpiresByType application/pdf "access plus 1 year"
ExpiresByType image/vnd.microsoft.icon "access plus 1 year"

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