Background tab setTimeout muffler

Defers setTimeout calls if no user input has been received for 15 seconds. Useful for stopping background tabs from continuing to use CPU cycles.

Maker
BinarySplit
Dagelijks aantal installaties
0
Totaal aantal installaties
175
Beoordelingen
3 0 0
Versie
1
Gemaakt op
12-06-2014
Bijgewerkt op
12-06-2014
Grootte
4,91 KB
Licentie
N.v.t.
Wordt toegepast op
Alle websites

Defers setTimeout calls if no user input has been received for 15 seconds. Useful for stopping background tabs from continuing to use CPU cycles. Only tested on Firefox.

This only handles the most common classes of background tab CPU abuse. It's still possible to use XMLHttpRequests, requestAnimationFrame, browser plugins, and possibly other tricks to continue to use the CPU while in the background.