XF 2.1 56% of loaded resources for XF are FA fonts

dethfire

Well-known member
Font awesome fonts account for more than half the loaded resources for XF. This is really crazy and there doesn't seem to be a way to remove them. I removed everything but fa-light-300.woff2 in my templates but preamble.min.js is still loading the others.

fa.webp
 
I'm not sure if there's a particular tool you're running to get those downloads, but it's likely not how an actual browser loads them, though there may be browser differences.

From your site, in Chrome, filtered down to the FA resources:

1591101169768.webp

Light is presumably the FA style you've selected. We always use solid as it is used for toggling in various cases.

So that should only be 2 requests (note that the woff versions aren't loaded by recent browsers). The first one doesn't have the correct version key:
Code:
 <link rel="preload" href="/styles/fonts/fa/fa-light-300.woff2?_v=" as="font" type="font/woff2" crossorigin="anonymous" />

I presume there's a template edit there as it's also not triggering a preload on the solid version (but it is being used).
 
I'm not sure if there's a particular tool you're running to get those downloads, but it's likely not how an actual browser loads them, though there may be browser differences.
That is taken from chrome 83 dev tools network tab
So that should only be 2 requests (note that the woff versions aren't loaded by recent browsers). The first one doesn't have the correct version key:

Thanks I corrected the version. I still see 3 loading, but only one is in the templates. I think I'll need to use the above resource to shave the font files down.
 
Back
Top Bottom