Feeds

Google to relieve AdSense webpage drag

Scripts a future free from browser hang

Intelligent flash storage arrays

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. ®

Intelligent flash storage arrays

More from The Register

next story
Bladerunner sequel might actually be good. Harrison Ford is in it
Go ahead, you're all clear, kid... Sorry, wrong film
Euro Parliament VOTES to BREAK UP GOOGLE. Er, OK then
It CANNA do it, captain.They DON'T have the POWER!
Musicians sue UK.gov over 'zero pay' copyright fix
Everyone else in Europe compensates us - why can't you?
I'll be back (and forward): Hollywood's time travel tribulations
Quick, call the Time Cops to sort out this paradox!
Megaupload overlord Kim Dotcom: The US HAS RADICALISED ME!
Now my lawyers have bailed 'cos I'm 'OFFICIALLY' BROKE
Forget Hillary, HP's ex CARLY FIORINA 'wants to be next US Prez'
Former CEO has political ambitions again, according to Washington DC sources
prev story

Whitepapers

10 ways wire data helps conquer IT complexity
IT teams can automatically detect problems across the IT environment, spot data theft, select unique pieces of transaction payloads to send to a data source, and more.
Getting started with customer-focused identity management
Learn why identity is a fundamental requirement to digital growth, and how without it there is no way to identify and engage customers in a meaningful way.
How to determine if cloud backup is right for your servers
Two key factors, technical feasibility and TCO economics, that backup and IT operations managers should consider when assessing cloud backup.
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.
Security and trust: The backbone of doing business over the internet
Explores the current state of website security and the contributions Symantec is making to help organizations protect critical data and build trust with customers.