Google Rolling Out Asynchronous AdSense Ads

Remember when BuySellAds started using non-blocking JavaScript to load advertisements on publisher’s sites? It made a huge difference in the speed pages took to load, since the ads wouldn’t load until all of the important stuff was done.

Google is finally doing the same with AdSense, with new asynchronous ad-serving code that is currently being used to load ads quicker in Chrome, Firefox and Internet Explorer 8. (They plan to expand to support other browsers after they’ve ironed the kinks out of the new script.)

The old show_ads did lots of work: loading additional scripts, gathering information about the web page it was running on, and building the ad request to send back to Google. The new show_ads has a different job. It creates a friendly (same-origin) iframe on the web page, and starts the old script with a new name, show_ads_impl, running inside that iframe. The _impl does all the heavy lifting, and in the end the ads look exactly the same. But there’s a substantial speed advantage: many things happening inside an iframe don’t block the web browser’s other work.

Publishers don’t need to change anything; Google took care of everything on their end. Supposedly it should shave off about 12% of the time it takes for the page to load, since the ads won’t hold up the page while they load.