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.

Autore
BinarySplit
Installazioni giornaliere
0
Installazioni totali
175
Valutazione
3 0 0
Versione
1
Creato il
12/06/2014
Aggiornato il
12/06/2014
Dimensione
4,91 KB
Licenza
Non disponibile
Applica a
Tutti i siti

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.