Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
A great blog post here about the performance issues with the plusone button.
I don't know if this module is affected by any of the points it raises, I thought I'd just share the link for you to have a look at.
Great module btw, thank you!
http://www.aaronpeters.nl/blog/google-plus1-button-performance-review
Comments
Comment #1
corbacho CreditAttribution: corbacho commentedThanks for the link, I'm concerned about JavaScript performance too.
Notice that I'm placing the script by default in the footer, so it shouldn't block rendering the HTML.
I will read further about it later, but the script he puts in the bottom looks nice.
I knew these other lazy loading patterns http://friendlybit.com/js/lazy-loading-asyncronous-javascript/
but each technique seems to have different issues or incompatibilities with browsers.
Other option is to cache the js file (like google analytics module does) so it can go through the normal js aggregation / gzip it and not as external script. Plus if you have LabJS, HeadJS, etc type modules... they will be able to optimize it.
But as I said, once I finish stabilizing the modules, I will look further into it.
Postponed by now, at least some days. Thx
Comment #2
corbacho CreditAttribution: corbacho commentedI added an option for 7.x dev branch to download Javascript asynchronously
I will appreciate feedback about it before made a release, specially because will be the default option.
Comment #3
andycowl CreditAttribution: andycowl commentedLooks like Google might have just saved you some work.
http://googlewebmastercentral.blogspot.com/2011/07/1-button-now-faster.html
Comment #4
corbacho CreditAttribution: corbacho commentedthanks andy, I saw it some hours ago.
I'm using almost same snippet already for some weeks, but now that is official is much better. Soon after holidays I will update the module.
The good news is that they are now rendering the button much faster, before was taking 2 seconds.
Comment #5
corbacho CreditAttribution: corbacho commentedclosing this. it was fixed long time ago