Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Request - Combine Google Font Requests as an Option #112
Great plugin. Thank you for your works.
In addition to "Remove Google Fonts" I think it would be great if there was a "Combine Google Font Requests" option as well.
In pagespeed for a site I'm working on, ironically google complains about 6 separate font requests and suggests reducing number of requests. Between all the plugins and theme features, one can end up with many different font lines in the html. In my case, 6.
All can be combined to a single request:
Hopefully this can be a quick addition to your plugin.
You may want to give https://github.com/zytzagoo/wp-google-fonts-optimizer a try :)
I just committed the Google Font optimization (choice between "remove", "combine fonts & link" and "combine fonts and load asynchronous with webfont.js") feature to AO Extra (it will integrate with your Autoptimize installation), so if you want download https://github.com/futtta/ao_extra/archive/master.zip and give it a spin maybe? :-)
@futtta , for some reason "combine fonts and load asynchronously with webfont.js" appears to not be asynchronous.
The webfont loader script is forced into head for my website (http://vanderbilthistoricalreview.com/), which is fine (and I expect intended), except for some reason my sites header code has wf.defer = 'true' even though you clearly wrote "async='true'" at https://github.com/futtta/ao_extra/blob/master/ao_extra.php#L225
This behavior occurs even with all of my other plugins turned off. I suspect somewhere in Auto-optimize, the plugin is aggressive adding "defer = 'true'".
I noticed in a user's question about a separate issue a couple of months, they also have "defer = 'true'" on their header despite having the option on. See: