so-widgets-bundle icon indicating copy to clipboard operation
so-widgets-bundle copied to clipboard

Way for themes to stop enqueueing various icon packs

Open gregpriday opened this issue 9 years ago • 4 comments

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.

gregpriday avatar Jul 11 '16 06:07 gregpriday

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

earmin avatar Dec 29 '17 01:12 earmin

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

liikalat avatar Jan 09 '18 20:01 liikalat

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 avatar Feb 27 '18 05:02 trentdrake

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/

trentdrake avatar Feb 27 '18 05:02 trentdrake