Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font-awesome has a large impact of page speed due to unnecessary elements being included. #1660

Open
Tembew opened this issue Jan 24, 2025 · 2 comments

Comments

@Tembew
Copy link

Tembew commented Jan 24, 2025

I've been trying to figure out how to reduce the impact of font-awesome, at least on first load. Primarily on the booking page as that is where loading slowly might give the worst impression. I've failed so far.

Few icons are used from the package so it would be good to optimize out the excess.

setting async does help.

<script src="<?= asset_url('assets/vendor/@fortawesome-fontawesome-free/fontawesome.min.js') ?>" async></script>
<script src="<?= asset_url('assets/vendor/@fortawesome-fontawesome-free/solid.min.js') ?>" async></script>

in booking_layout.php

@alextselegidis
Copy link
Owner

Hello!

Thanks for submitting this.

I will take a closer look.

Alex Tselegidis, Easy!Appointments Creator
Need a customization? Get a free quote!

@Tembew
Copy link
Author

Tembew commented Jan 27, 2025

Thanks. I use https://pagespeed.web.dev/ to check. Setting async or defer doesn't always help. The app seems to use a tiny part of fontawesome but i realize it might not be easy to only cut those out of the main package. There are alternatives. eg. boxicons or fontello allow selecting icons and only including those.

Another big impact is moment timezone js. This could be helpful https://engineering.wework.com/how-we-halved-the-bundle-size-of-our-react-apps-to-decrease-page-load-times-2c33310bb99

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants