ShoutMeLoud – Shouters Who Inspire

≡ Menu
≡ Menu

How to Make Google Plus Button Load Faster

How to Make Google Plus Button Load Faster

google plus faster If you are a regular visitor of Shoutmeloud, you would have noticed the addition of Google+ button at the top – embedded with the sticky bar. You’ll find another Google+ button below the post titles as well. It’s important to note that these buttons show different counts. How to enable a similar stuff on your blog? Well, I’ll be explaining the same in this article and I’ll dig a little deep about Google’s obsession with speed on this button.

It’s pretty easy to add the Google+ button on your homepage (or) on the post page of your blog. Just visit the following link and grab the button of your choice and paste the same anywhere on your template or theme. Simple! By default, the script will pick up the URL as found in the DOM.  However, I suggest you to add a href attribute to the code. Why because, Google suggests you to do the same. When you read the documentation page of the article, you’ll find the following statement.

If neither the href nor the link rel="canonical" are specified, Google will use the URL of the page as found in the DOM. This can sometimes cause incorrect behavior as the URL in the address bar can contain session IDs or other parameters which are not part of the canonical URL. Therefore, we highly recommend using either the href attribute or rel="canonical".

How do I add the href attribute? Simple. Just mention href=”YOUR URL” along with the <g:plusone/> tag. So, your code should be similar to the one shown below.

<g:plusone href=""></g:plusone>

The logic is pretty simple! Have the default version of the Google+ button on your post pages so that it picks the URL from the DOM while the button that should +1 the homepage shall be specifically tagged with the href attribute. That’s it!

Well, coming to the speed with which the plus button loads, Google by default is working on the loading speed of the button. You don’t have to make any changes for the same. However, there’s another script that you can include instead of the default version – Asynchronous Loading Script which will load the script much faster than it did before.

Basically, this script downloads the +1 JavaScript while your browser loads the other elements on your website. In short, a parallel processing between the +1 JavaScript and the other elements on the web page. To add the same, just replace the standard version of the JavaScript with the one shown below.

<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = '';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);

Note: Use either the standard version or the script above but not both of them. 

To know better about the script, just check out the documentation page here – More about Google+1 button. Well, if your one candidate who is obsessed with page speed, just like Google, then you can use the Asynchronous Script. Else, I suggest you to stick with the default version. Let me know what version do you use via comments and your knowledge about Google+ as well!

  • Author Bio

  • Latest Post

Article by Mukund

Mukund has written 30 articles.

If you like This post, you can follow ShoutMeLoud on Twitter. Subscribe to ShoutMeLoud feed via RSS or EMAIL to receive instant updates.

{ 8 comments… add one }

  • Bhaveek

    I have already updated the google + code, but i really didnt see faster load of g+ button.

  • Kimi

    This is a great post, since I am really interested and concerning about page speed of my blog.

    I have removed my button last week, since it somewhat slowed my blog down.

    I will try this tip to implement in my site, and we will see if it can load faster.

    Thanks Mukund!

    • Mukund

      Well, many are quite concerned about page speed these days! Yes! Try the above script and let me know if you find any change – you should:)

  • shashank chinchli

    its working perfectly well for my blog. thanks a lot mukund!

    • Mukund

      Yup! I personally check them before I post them! So, it should work! Thanks for the comment buddy:)

  • Mukund

    Yes! I’ve come across those problems on my demo blog as well. Just connect with me on gtalk and I’ll help you out if you, further, face issues with the button.

  • Sagar

    Thanks for the info Mukund, I earlier had problems with the G+ button not loading up on my blog correctly, will try what you mentioned above:)

  • Anil Singh

    Very interesting tips for every blogger bcoz google+1 optimize their blog ranking in search engine.


Leave a Comment