5 exercises on browser rendering pipeline vocabulary.
0 / 5 completed
1 / 5
What is the DOM in the browser rendering pipeline?
DOM: the Document Object Model is the browser's in-memory tree built from parsing HTML. JavaScript manipulates it, and the browser uses it together with styles to build what is painted on screen.
2 / 5
What is layout (also called reflow)?
Layout/reflow: after styles are computed, the browser calculates geometry — where each box sits and how big it is. Changing a layout property (like width) triggers reflow, which can be expensive if it cascades.
3 / 5
What is painting in the rendering pipeline?
Painting: the step that rasterizes visual content (colors, borders, text) into pixels. Properties like color or box-shadow cause repaints, which are cheaper than full reflows but still cost performance.
4 / 5
Why is compositing on the GPU efficient for animations?
Compositing: the browser splits the page into layers and lets the GPU move, scale, or fade them. Animating transform and opacity avoids layout and paint, producing smooth 60fps motion.
5 / 5
Why can excessive layout thrashing hurt performance?
Layout thrashing: interleaving DOM reads (offsetHeight) and writes in a loop forces the browser to recompute layout repeatedly. Batching reads then writes, or using requestAnimationFrame, avoids this stall.