On June 1 2011, Google released the +1 Button for the whole web. Being a web performance optimization consultant and knowing the Facebook Like Button and other third party widgets, ads and trackers can have a significant impact on page load time, I immediately took a look at the Google +1 Button code, created a test page and ran some first performance test.
In this article I want to share my findings with you. In short: the Google +1 Button performance is very disappointing. The extra page load time can easily be 2 seconds.I have found 6 performance issues for the Google +1 Button as it is now.
Read the description of each performance problem first - and especially 1,2 and 5 - and then view the code for loading the Google +1 Button in a non-blocking way.
- Blocking JavaScript in the <head>
- Redirect from HTTP to HTTPS (aka: the typo in the code generator)
- Browser caching for 6 minutes, proxies disallowed
- Serve the JS file over HTTPS
- Document.write for Blogger pages
- JS file is not minified
