Search⌘ K
AI Features

Reducing Browser Reflows

Explore techniques to minimize browser reflows, a process where the browser recalculates layouts, which can block user interactions. Learn how DOM structure, CSS efficiency, and JavaScript manipulations impact reflow time, and discover strategies to batch DOM changes, use efficient CSS selectors, and promote certain animations to the GPU for smoother page rendering.

Reflow is the name of the web browser process for re-calculating the positions and geometries of elements in the document for the purpose of re-rendering part or all of the document. Because reflow is a user-blocking operation in the browser, it is useful for developers to understand how to improve reflow time and to understand the effects of various document properties (DOM depth, CSS rule efficiency, different types of style changes) on reflow time.

Sometimes, reflowing a single element in the document may require reflowing its parent elements and any elements which follow it.

There are a great variety of user actions and possible ...