Starting with Chrome 57, released last week, Google has put a muzzle on the amount of resources background tabs can use.

According to Google engineers, Chrome 57 will temporarily delay a background tab's JavaScript timers if that tab is using more than 1% of a CPU core. Further, all background timers are suspended automatically after five minutes on mobile devices.

The delay/suspension will halt resource consumption and cut down on battery usage, something that laptop, tablet, and smartphone owners can all relate.

Work on throttling JavaScript timers began two months ago

Google hinted in late January that it would limit JavaScript timers in background tabs, but nobody expected it to happen as soon as last week's Chrome release.

JavaScript timers are exactly what you think they are, simple count-down and count-up timers implemented in JavaScript. These simple JavaScript functions play a crucial role in modern web development, being used especially on websites that deal with real-time content.

Facebook, Twitter, Gmail, Slack, YouTube, Evernote, and many other sites rely on JavaScript timers to update content in the user's browser.

Google says that in most cases, developers have abused timers, which often continue to work and consume resources even when the user switches to another tab.

Google says that by throttling JavaScript timers in Chrome 57, they've achieved "25% fewer busy background tabs."

Throttling doesn't apply to some "special" background tabs

The good news is that background tabs playing audio or maintaining real-time connections like WebSockets or WebRTC won’t be affected by the 1% CPU usage limit.

In a document released today, Google detailed future plans for background tabs throttling.

Q2 2017

Suspend all background operations (not just timers) on mobile devices.

Web apps should be able to opt-out from some forms of aggressive throttling.

Evaluate if other actions (such as loading operations) could be throttled in background tabs.

Q3 2017

Budget-based throttling for offscreen frames

2018

Throttle web worker operations

Suspend all JavaScript operations in background tabs after "n" minutes, unless a web developer states that the tab should continue to run via an explicit opt-out.

2020+

Remove the opt-out and pause all background pages