templaza / astroid-framework

Powerful framework for designers and developers to create responsive, fast & robust Joomla based websites and templates.
https://astroidframe.work/
GNU General Public License v3.0
83 stars 13 forks source link

reducing the number of fontawesome requests #593

Open SerGun78 opened 7 months ago

SerGun78 commented 7 months ago

hi all. My life hack on how to reduce the load on the site and increase loading speed. In contactinfo.php, change all icons to solid. There are two solid (phone +mobile) and two regular (envelope and clock). So I changed the icons for mail and work time from regular to solid, now one regular icon font does not load, i.e. the number of requests decreased by one. At the same time, we must not forget that there is no longer a need to add icons from regular to the site, so that the regular font will not be loaded again. firefox_yx7oJyXGTC

Chacapamac commented 6 months ago

“ Need for Speed ” 🏎 Thanks for the hint @SerGun78

uzielweb commented 6 months ago

Use FontAwesome JS load in FontAwesome options instead CSS load. Disable FontAwesome CSS, Include FontAwesome JS and SVG folders. This will load only each needed SVG instead entire TTF, OTF or other fonts files.

@sonvnn check this as an option for the template options ;)

Chacapamac commented 6 months ago

Use FontAwesome JS load in FontAwesome options instead CSS load. Disable FontAwesome CSS, Include FontAwesome JS and SVG folders.

@uzielweb — Not sure where to find these options?

Giorgi625 commented 6 months ago

In plugin there is not CSS or JS option. there is CDN or Local image

uzielweb commented 6 months ago

Does not exist this option. You can add it as a script to the header and upload all SVG and JS files needed. My suggestion is to create this as an extra option @sonvnn

sonvnn commented 6 months ago

Thank you! I will check it in the next versions.

SerGun78 commented 6 months ago

I tested the loading option via js fontawesome. According to my observations, this does not lead to a decrease in requests and the weight of the site, but rather increases the load. maybe I'm wrong. If someone checked the proposed option, please provide your changes at site speed.