Feeds

Google to relieve AdSense webpage drag

Scripts a future free from browser hang

Security for virtualized datacentres

Velocity Google has admitted that its AdSense text ads can account for 12 per cent of a webpage's load time, but the company is testing a revamped script designed to minimize the amount of time Google ads spend blocking pages.

Speaking this morning at the internet-infrastructure obsessed Velocity conference in Santa Clara, California, Google mathematician Michael Kleber said the company has been testing its iframe script for about a week on live sites. Crucially, the new script does not require website publishers to change their AdSense code.

"We want to minimize the amount of time we spend blocking the publisher page," Kleber said. "We want a webpage to be as fast with ads in it as without. But we want to do it without having publishers recast. We want to do it without them changing anything on their page, because, you know, AdSense is on millions of websites, and there's no way we're going to get millions to changes their pages.

"We want to have this work by default and not just for elite webmasters that keep up with best practices."

The company's solution is to replace the existing 40K-ish "show ads" AdSense JavaScript (show_ads.js) with a tiny loader script that creates an inline frame on the publisher's webpage. The rest of the script executes within that iframe, separately from the page itself.

With the old "show ads" setup, when the page downloads the script, all sorts of other tasks stop as the browser works to execute the code. But with the iframe setup, Google can access the same code path without causing the same stoppage.

"The remarkable thing is that it works and it's very fast," Kleber said. "Even though the script running inside the publisher page doesn't lock the publisher page from doing all the other things it wants to do, we still execute as quickly as possible, right on top of the stack."

According to Kleber, the median time that the old show ads script spent blocking the page was 47ms, and in the 90th per centile, this figure jumped to 288ms. With the new iframe script, the median figure drops to 11ms and in the 90th per centile the number dips to 32ms.

Kleber said there are still some problems with the setup, related to disparate setups among the various browsers. With Internet Explorer, for instance, some ads may be blocked when multiple iframe scripts are loaded at the same time. There are also issues related to using browser forward and back buttons. Sometimes, when you return to the page, the script will use the ads already there rather than re-fetching.

But Kleber hopes to roll out the new setup to more AdSense sites "in the very near future." Yes, there are similar problems with other Google services, including Google's DoubleClick ads and Google Analytics. But Kleber said that these don't slow webpages nearly as much as AdSense.

Google Analytics, he said, accounts for about 5 per cent of a webpage's load time. And with the new asynchronous Google Analytics snippet, he added, this figure should drop. ®

Top 5 reasons to deploy VMware with Tegile

More from The Register

next story
Facebook pays INFINITELY MORE UK corp tax than in 2012
Thanks for the £3k, Zuck. Doh! you're IN CREDIT. Guess not
DOUBLE BONK: Testy fanbois catch Apple Pay picking pockets
Users wail as tapcash transactions are duplicated
Happiness economics is bollocks. Oh, UK.gov just adopted it? Er ...
Opportunity doesn't knock; it costs us instead
Google Glassholes are UNDATEABLE – HP exec
You need an emotional connection, says touchy-feely MD... We can do that
YARR! Pirates walk the plank: DMCA magnets sink in Google results
Spaffing copyrighted stuff over the web? No search ranking for you
In the next four weeks, 100 people will decide the future of the web
While America tucks into Thanksgiving turkey, the world will be taking over the net
prev story

Whitepapers

Why cloud backup?
Combining the latest advancements in disk-based backup with secure, integrated, cloud technologies offer organizations fast and assured recovery of their critical enterprise data.
A strategic approach to identity relationship management
ForgeRock commissioned Forrester to evaluate companies’ IAM practices and requirements when it comes to customer-facing scenarios versus employee-facing ones.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
New hybrid storage solutions
Tackling data challenges through emerging hybrid storage solutions that enable optimum database performance whilst managing costs and increasingly large data stores.