- Google Plusone widget
- Google Analytics code (older one)
- Facebook like button
Please note that by increased page load time, we are not necessarily talking about large sized objects and scripts alone. The page load time sometimes is caused by the servers that do not respond well due to millions of hits coming their way.
Google Plusone Async & Analytics Asynchronous scripts
The following picture is a small part of the Page load time report of a famous technology blog. The total load time for this VPS hosted blog homepage was just 4.1 seconds when I tested. This is really good numbers considering that the page weighed 1MB plus and there were a total of 124 HTTP requests.
Unfortunately, the plusone.js script from Google (highlighted above) was an outdated synchronous script which was taking almost 1 second to respond the HTTP request which is shown as the yellow bar. This is the time taken from request to receive the first byte of a rather small script. The learning here is that by replacing the old script with the Google Plusone Async script you are going to save 1 second out of the 4.1 seconds. How cool is that?
The case is the same if you are using the older Google Analytics code to track your page views. Google had recently launched the Async script for Google Analytics that you can download from your Analytics account and update the blog accordingly.
Other Social Widgets
From my experience, the twitter tweet buttons load faster most of the time, even in the sync mode. However, facebook send scripts are not only heavy but also too slow at times. We don’t have an easy way around here as it looks but there are some code examples that I found on other websites. I tried with some but without much luck.
There are some ad network scripts are too slow to respond as well (e.g. Tribalfusion snippets that I found on some sites). Not many ad servers are as fast as Google AdWords and if you are using multiple ad networks on your blog, you may want to check with them to see if they have any async code at all.
The main advantage of asynchronous scripts is that they don’t make other page elements wait to render. This results in improved user experience. On top of that, async scripts can be added even on top of the page. For example, older Google Analytics scripts are typically added at the end of the page just before the body tag closes where as the async code can be anywhere on the page.
Note: Those who are using their theme settings for entering Google Analytics ID may have to change the theme code in order to get benefited from the Async analytics code. If your theme designer hasn’t updated it yet, that is.