; Updated Code for Google +1 Buttons | Google Operating System News

Wednesday, 27 July 2011

Updated Code for Google +1 Buttons

Updated Code for Google +1 Buttons

As reported last month, the code for Google +1 buttons could be improved so that the buttons load faster and stop blocking other resources. Google updated the code and recommends publishers to generate a new code.

"We're 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," explains Google.


Google also optimized the existing code so that the button renders up to 3 times faster. Even if you don't update the code, you'll still benefit from these changes.

The code generator is easy to use and I've noticed that a lot of sites added a +1 button next to Facebook's "Like" button. It's unfortunate that Google didn't optimize the code when it was released.

No comments:

Post a Comment