IT lexicon › Web › Animation frame

Animation frame

Web På svenska → Updated: 2026-11-15

A browser API that schedules code to run just before the next screen refresh, ensuring smooth 60 FPS animations.

requestAnimationFrame() is the recommended way to animate on the web instead of setTimeout or setInterval, because it's synchronized to the display's refresh rate. The browser can also pause the callback if the tab isn't visible, saving CPU and battery. Under the hood, this ties into the rendering engine and links directly to jank when long-running tasks block frame delivery.

← Back to the lexicon