siteorigin / so-widgets-bundle

The SiteOrigin Widgets Bundle gives you all the elements you need to build modern, responsive, and engaging website pages. Using the Widgets Bundle, you can quickly and effortlessly add buttons, sliders, heroes, maps, images, carousels, features, icons, and so much more.
https://siteorigin.com/widgets-bundle/
94 stars 64 forks source link

Way for themes to stop enqueueing various icon packs #264

Open gregpriday opened 8 years ago

gregpriday commented 8 years ago

If a theme already includes something like Font Awesome, using an icon-based widget with a Font Awesome icon, will cause FA to be enqueued twice.

Ideally, we should have a way for theme developers to specify which icon packs they've already included, and the version.

One possible solution would just be to look at enqueues for any string that contains font-awesome. This might be prone to issues though.

earmin commented 6 years ago

Hi, Is there any news about the issue? It highly reduces the page score on GTmetrix tests. Thanks

liikalat commented 6 years ago

I have also been looking solution for this issue. Any upcoming solutions?

trentdrake commented 6 years ago

I'm trying to come up with a clean way to achieve this too, and in a way that will survive Wordpress and Theme updates.

The primary reason is because PageSpeed tests give a poor grade for serving the same resource twice. I use a SiteOrigin theme that loads fontawesome from it's own theme directory, so when the 'SiteOrigin Widgets Bundle' also loads the same resource from a second location, the 'mulitiple locations' error is triggered.

I don't this a really a very big impact on site performance, but when you're trying to maximise your PageSpeed score to show a client, every little bit helps.

screen shot 2018-02-27 at 1 27 49 pm

trentdrake commented 6 years ago

this has been resolved and a solution can be found here https://siteorigin.com/thread/duplicate-font-awesome-url-causing-site-slowdown-as-per-gt-metrix/