Social share buttons like Google +1, Facebook like, Tweet, Pinterest pin-it, and more use separate scripts to get rendered on a webpage. These scripts dramatically slow down the loading of a website, and slow loading websites are not user as well as search engine friendly…
..Only use the markup part, i.e.
<div class="g-plusone" data-annotation="inline" data-width="300"></div> on your site. Do the same with the other social share buttons too, and at last, add the following script below the closing body tag (
</script> tag in our Social media assets loader snippet.
Delay loading Social Media assets
I’ve done a little experiment on the site with the same snippet and noticed a great improvement in my Page Speed and YSlow score after it’s implementation. I’ve been using some social media widgets and buttons on the site, that were creating a big render block previously during load times.
What I’ve done is: I’m loading the scripts a little bit after the page finishes loading in the browser window. I’m using the
Also let me know your thought on this, you are free to fork this script. Suggestions and doubts are welcome, keep experimenting :)