RE: Throttling requestAnimationFrame based on viewport visibility

Just checking back to see what was found from this investigation and follow-ups with Mozilla.

Is there anything that we should be improving in the specs for Page Visibility or the HTML5 reference for requestAnimationFrame related to this that will assist implementors?


From: Ilya Grigorik []
Sent: Tuesday, August 11, 2015 4:49 PM
To: Sami Kyostila <>
Cc: public-web-perf <>
Subject: Re: Throttling requestAnimationFrame based on viewport visibility

Hi Sami.

On Tue, Aug 4, 2015 at 7:15 AM, Sami Kyostila <<>> wrote:
The obvious compatibility risk is breaking pages that rely on an
out-of-view rAF to function. We're trying to avoid that by only
throttling cross-origin iframes -- with the hope that since there's no
synchronous way to observe rAF callbacks in those frames, sites are
less likely to rely on their timing. Does that sound reasonable?

I think the best answer to this would be to watch for developer feedback on Mozilla's implementation? :)

The motivation sounds reasonable, but it's hard to say what this might break. Also, as you pointed out in [1] singling out raF is a bit arbitrary.. curious to see what you'll learn from your experiments!



Received on Wednesday, 9 December 2015 23:18:05 UTC