Tuesday, July 26, 2011 at 1:49 PM
Webmaster level: AllOne of the 10 things we hold to be true here at Google is that fast is better than slow. We keep speed in mind in all things that we do, and the +1 button is no exception. Since the button’s launch, we have been hard at work improving its load time. Today, we’re proud to announce two updates that will make both the +1 button and the page loading it, faster.
First, we’ve begun to roll out out a set of changes that will make the button render up to 3x faster on your site. No action is required on your part, so just sit back, relax, and watch as the button loads more quickly than before.
In addition to the improvements made to the button, we’re also introducing a new asynchronous snippet, allowing you to make the +1 experience even faster. The async snippet allows your web page to continue loading while your browser downloads the +1 JavaScript. By loading these elements in parallel, we’re ensuring the HTTP request to get the +1 button JavaScript doesn’t lead to an increase in your page load time. For those of you who have already implemented the button, you’ll need to update the code to the new async snippet, and then you should see an overall improvement in your page load time.
To generate the new async snippet, use our +1 Configuration Tool. Below, you’ll find an example of the code, which should be included below the last <g:plusone> tag on your page for best performance.

If you haven’t already implemented the +1 button on your site, we’re excited for your first experience to be a fast one. This is a great opportunity to allow your users to recommend your site to their friends, potentially bringing in more qualified traffic from Google search. To those that already have the button, we hope that you enjoy the improvements in speed. Our team will continue to work hard to enhance the +1 button experience as we know that “fast is better than slow” is as true today as it’s ever been.
If you have any questions, please join us in the Webmaster forum. To receive updates about the +1 button, please subscribe to the Google Publisher Buttons Announce Group. For advanced tips and tricks, check our Google Code site.


48 comments:
Thanks!
Nice but when will Google start showing us all of the things we've plussed in searches and inside G+? When we go to the +1 section of our Google Profile all we see are the +1 items that we pressed on websites using the +1 button (mostly blogs and youtube videos).
We would like to aggregate all of the +1's to our +1 section in our Google Profile, including all of the posts and comments that we +1 inside G+ and the items we +1 in search.
Also, please replace the like button on YouTube with the +1 button...and add the -1 button everywhere while you're at it. :)
Oh and thanks for making it faster to click the button.
lerning first....thanks^^ ☺
I wish hitting +1 posted the click to your circles.
Please launch official browser extensions to make it easier to give a +1 to web pages which does not have this button. Your Google Chrome ad showcased such a button that is still not on the Chrome App Store!
* tests on YouTube sharing *
Yep; It's faster. Good work!
Could you offer a button in valid HTML?
@toscho
http://code.google.com/apis/+1button/ has the code...
<div class="g-plusone" data-size="standard" data-count="true"></div>
If you use jQuery, this is the most "efficient" way (i.e. does not block the DOM loading and parsing). Furthermore, you can put the javascript anywhere inside the html.
https://plus.google.com/117939449396284436490/posts/NGM2wvrbR1z
That's great, but when will Google Music upload my ogg files? That'll make the +1 on Google Music a lot faster ...
@herbhalstead
+1 to this.
Hitting +1 should post to our Google+ profile.
SORRY FOR YELLING, BUT PLEASE GIVE US A BOOKMARKLET OR EXTENSION TO POST on GOOGLE+ FROM THE BROWSER.
IF YOU WANT ACTIVITY, MAKE IT EASY FOR US TO POST
This modification would definitely help as current plusone is too slow to load
I'm assuming if we are now adding the async version of the +1 button to our sites we should remove the following from our headers:
script type="text/javascript" src="https://apis.google.com/js/plusone.js"
Love hearing this latest development about +1 and the related tings to it. One more thing to add, make it visible to everyone although without signing in their Google account.
OUT OF TOPIC, BUT RELATED
Also do something new to the Buzz button.
I cannot find the new async code.
When I open my website in IE8, there's a page error at the bottom. Clicking it reveals the following error. Could this be looked into, as errors on a web page can be looked upon poorly by some.
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
Timestamp: Wed, 27 Jul 2011 13:19:10 UTC
Message: Exception thrown and not caught
Line: 18
Char: 461
Code: 0
URI: https://apis.google.com/js/plusone.js
I have problem with async load +1 button in IE8. Example on http://www.crazycafe.cz/vtipna-videa/2011/7/27/videa/americke-kocky-se-hlasi-o-adopci/
I still don't see the new code, and i really want to have this on my Blog DiosCaficho.com, because i love the +1 button, and as you can see in it i used a lot.
Thanks for the update.
Does this fix the issue application/xhtml+xml as well?
or do we still need to make a text/html frame to load in via the <object type="text/html"> which also slows down our page? (as that frame will in turn load an iframe)
This new code still does not work for Brazil?
When selected Portuguese (Brazil) did not show up!
(Google Tradutor)
Does it now work on mobile devices / browsers? I tried all three versions and it does not work on android or iphone either
Explora.info/qr/p1.html
And p2 and p3
Regards
Sws
Can you give us some more details, how you achieved THIS:
"First, we’ve begun to roll out out a set of changes that will make the button render up to 3x faster on your site."
Kind regards,
Markus
Seems Google Plus is growing day to day.
Can't we just get a simple REST API instead, so that we can make our own G+ buttons or integrate it in ways that you haven't yet thought of? It's ridiculous that we should have to fetch a javascript, when we could just have a regular link with some GET parameters.
the german version of the +1 Configuration Tool won't give you the asynchronous code - only(?) the "English (US)" version will.
I posted a question on my Google+ account here: https://plus.google.com/116616619591934711184/posts/fpTnaqRnvJ1
I'm not sure if this is a bug or if I need to fix something. The graph is showing that I have no plus one's when I select "all +1's" and yet when I go to the site it shows I have 15 +1's. The graph shows the 15 dropping to 0 on the 24th. I've seen this same issue with other clients as well.
Isn't it possible to just add a simple async="true" to the script tag instead of creating by script a new script and inserting it before the first script-tag?
It is not working in my site when my site is opened with IE8 then showing error
Gracias por la actualización
thanks for info update for me G+1
Thanks ! I minified it to win a few bytes, like for Google analytics snippet in HTML5 boilerplate.
You can get it here if you are interested : http://web20hub.wordpress.com/2011/08/02/google-plus-one-async-code-minified-javascript/
@Thomas
Why not use the CDN so users only have to download one copy of the +1 script in their browser? Minifying it is nice, but then you won't be able to rely on the user having already cached it from elsewhere.
@Matt Beckman : The aim is not the same, you talk about the Google script called by the snippet given by Google.
I only minified that snippet, not their entire script.
Read the post, you will understand what I said :)
Anybody from Google is actually reading these comments, Or the Webmaster Help Forum?
I have been trying to get an answer for a couple of days on how to add the +1 button on my site, for the code doesn't work. Anybody, please? http://www.google.com/support/forum/p/Webmasters/thread?tid=024b971d9f0c76b0&hl=en
Thanks
thanks for the async loading ... hope it will work as well as it works on Google Analytics !
By the way, in the async loading, does anybody know how to "capture" when the snipped is loaded ? A JS event or a callback function would be welcomed ...
As long as the snipped seems to be loaded only on recent browsers, I need to "capture" if the snipped is not loaded (for example, on IE7)
Thanks
Emile
NB : for those who are not logged in "english language" (like me), they will not find the new async code ... it only appears in english. Hope Google will quickly translate this page !
Hope we will soon get other options like limiting thé scope of .go() function to a target html element.
What About Share button? When I clicked plus one button nothing happened posts shown in my G+ profile at +1 tab. I think Google should make a sharing button too. People need it.
Google page speed rank increases by 5% with the async +1 code -- exactly the same page without any +1 button has a reduced page speed rank; I've been able to reproduce this effect several times. Did anyone else experience the same? In "reality" of course the page loads faster when the button is not loaded.
I thought to implement it today on my website.
OMG, what a mistake!!! The site comes to a crawl…. Loading time is OVER 10 times longer as it was without the “+1″ button…
Meanwhile, it also stops your other scripts on your page, till that thing is fully loaded, causing on my website the menu not to function for that time…
As fast as I put the code into the pages, the faster it comes out!
the new "faster" button is still slow too, don't know why google overlooks sometimes very minor things!
anyway, this can be made faster by simply changing protocol from httpS to http only
detail and benchmark here: http://nabtron.com/speed-up-google-1-button-javascript-by-10-times/6593/
Hello! And what about a buttom to share posts From blogger..? That would Be improving!! It s a bad situation... Fb has it...
Hey where is the async code ? The +1 tool show me the old code !
It is still slow. Takes 3-4 seconds.
Can you give us some information about how to achieve this, we started to introduce a set of changes that will be key to view up to three times faster on your site.
I found your post to be very helpful- thanks
Post a Comment