Feeds

Google urges background tab websites to throttle themselves

Here, use this API

Internet Security Threat Report 2014

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

Choosing a cloud hosting partner with confidence

More from The Register

next story
Netscape Navigator - the browser that started it all - turns 20
It was 20 years ago today, Marc Andreeesen taught the band to play
Sway: Microsoft's new Office app doesn't have an Undo function
Content aggregation, meet the workplace ... oh
Do Moan! MONSTER 6-day EMAIL OUTAGE hits Domain Monster
Customers freaked out by frightful service
Sign off my IT project or I’ll PHONE your MUM
Honestly, it’s a piece of piss
Return of the Jedi – Apache reclaims web server crown
.london, .hamburg and .公司 - that's .com in Chinese - storm the web server charts
NetWare sales revive in China thanks to that man Snowden
If it ain't Microsoft, it's in fashion behind the Great Firewall
prev story

Whitepapers

Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
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.
Win a year’s supply of chocolate
There is no techie angle to this competition so we're not going to pretend there is, but everyone loves chocolate so who cares.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
Intelligent flash storage arrays
Tegile Intelligent Storage Arrays with IntelliFlash helps IT boost storage utilization and effciency while delivering unmatched storage savings and performance.