How we built it

Intervention: Throttle timers in out-of-view frames

As an intervention we want to limit the rate at which timers in out-of-view, cross-origin frames are able to fire. Until very recently it wasn't possible for script authors to easily determine whether their content was visible to the user or not. A common pattern therefore is to use a continuous setTimeout() loop for driving animations without considering visibility, which can be very costly for performance.


A potential compatibility risk is that a site can observe timers firing out-of-order if the timers are scheduled from a mix of visible and hidden frames. To reduce this risk, we propose to only throttle timers in cross-origin frames.



Status in Chromium

Enabled by default (launch bug) in:

  • Chrome for desktop release 54
  • Chrome for Android release 54
  • Android WebView release 54
  • Opera release 41
  • Opera for Android release 41

Consensus & Standardization


Last updated on 2016-09-07