The shift to working online over the last few years has led to a massive increase in demand for performant browsers, while at the same time reducing resource consumption and battery power.
With this in mind, browser vendors and Microsoft teamed together to create three new APIs. We've already explored one, in the form of the Page Visibility API; the other that we're going to look at is requestAnimationFrame. All three (the third being setImmediate) were designed for better performance and increased power efficiency.
So, what is requestAnimationFrame? Simple – if you've spent any time creating animation using jQuery, you will no doubt have used the
setInterval method (or even