jank
Visible stutter or freezing in scrolling or animation, caused when the browser misses frames because work took too long.
In more detail
It is most noticeable while scrolling and during animations. Common causes are long JavaScript tasks, layout thrashing and non-passive touch or wheel listeners that make scrolling wait for the main thread.
Related terms
- frames per second — How many new images a screen shows each second; 60 frames per second is the usual target for smooth motion.
- passive event listener — An event listener registered with { passive: true }, which promises never to call preventDefault, so the browser can scroll immediately without waiting for it.
- long task — A task that keeps the main thread busy for more than 50 milliseconds, long enough for users to notice lag.
Taught in
- Passive Listeners, Scroll Performance And Touch Interactions — Frontend Architecture & Web Platform
- requestAnimationFrame vs requestIdleCallback: High-FPS Work — Frontend Architecture & Web Platform