Feeds

Google urges background tab websites to throttle themselves

Here, use this API

The essential guide to IT transformation

Velocity Google has urged website developers to use Chrome's experimental Page Visibility API to reduce their sites' activities when they're not actually being viewed by browser users.

Now included with the developer version of Chrome – and due for arrival in the beta version next week – the PageVisability API allows websites to determine when they're actually being viewed by users – and when they're just sitting in the background. The API can tell you when a site is sitting inside a background tab, but also when a site has been pre-rendered by Chrome's new Instant Pages tool.

Just announced this week, Instant Pages attempts to predict what Google search result you're going to click on and then pre-renders the page before you actually click. Of couse, there will be cases where Google's prediction is incorrect, and the Page Visability API allows webmasters to identify such false traffic.

But webmasters can also use the API to determine when a site is sitting in a background tab – Instant Pages pre-renders sites in what is essentially a hidden tab – and on Thursday, at O'Reilly's Velocity conference in Santa Clara, California, Google engineers Arvind Jain, Sreeram Ramachandran, and Mike Belshe asked developers to use the API as a means of scaling back their site's operations when they're relegated to the background.

"We all build our webpages on our own, and we try to take the resources that we need to run our webpages," Belshe said. "And that's what we should be doing. When we're in the background, if we can recognize that other pages are running too and knock our own stuff down, that's really the way to go".

Mike Belshe

Mike Belshe

Google has proposed the API to the W3C as a standard, and it hopes that other browser vendors will adopt it as well. After Belshe's talk, Mozilla open source evangelist Chris Blizzard told us that he and Mozilla are still mulling the ramifications of the API.

With Chrome, Belshe said, Google already worked to downgrade activity in background tab. He called this the "real" reason Chrome is so fast. "For things that aren't running [in the foreground tab], we knock them to a lower priority. Not only does that make sure that Chrome runs better, it makes it so that Outlook or Word or whatever else runs better," he said.

But he added that website owners can improve performance even more by "knocking down" their own activity when their sites are running in the background. "If you've got a webpage that's doing stuff constantly, you tap into the Page Visibility API, and you slow it down. You don't have to stop. Just slow it down."

Belshe ran a benchmark showing that Chrome is significantly faster than Microsoft Internet Explorer when heavy JavaScript is running in multiple tabs, saying this was the result of Google's work to reduce activity in background tabs. Blizzard told us that Mozilla is treating background sites in similar fashion with Firefox 5, due for release next week. ®

Secure remote control for conventional and virtual desktops

More from The Register

next story
BBC: We're going to slip CODING into kids' TV
Pureed-carrot-in-ice cream C++ surprise
China: You, Microsoft. Office-Windows 'compatibility'. You have 20 days to explain
Told to cough up more details as antitrust probe goes deeper
Linux turns 23 and Linus Torvalds celebrates as only he can
No, not with swearing, but by controlling the release cycle
Scratched PC-dispatch patch patched, hatched in batch rematch
Windows security update fixed after triggering blue screens (and screams) of death
This is how I set about making a fortune with my own startup
Would you leave your well-paid job to chase your dream?
prev story

Whitepapers

Endpoint data privacy in the cloud is easier than you think
Innovations in encryption and storage resolve issues of data privacy and key requirements for companies to look for in a solution.
Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Advanced data protection for your virtualized environments
Find a natural fit for optimizing protection for the often resource-constrained data protection process found in virtual environments.
Boost IT visibility and business value
How building a great service catalog relieves pressure points and demonstrates the value of IT service management.
Next gen security for virtualised datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.