[Study Notes] Browser Rendering Phase
After the HTTP/HTTPS connection is established between the client and server, the HTML file is sent over to begin loading the page. This is the beginning of the Browser Rendering Phase.
Browser Rendering Phases
- HTML Parsing -> DOM Tree creating
- CSS Parsing -> CSSOM Creating
- Render Tree (Combines DOM and CSSOM)
- Layout Phase (Reflow occurs here)
- Paint Phase (Repaint occurs here)
- Composite Phase
HTML Parsing (Document Object Model Tree)
After receiving the HTML file from the server, the browsers begins the Browser rendering process by parsing the HTML file and begins to create the DOM Tree (Document Object Model).
CSS Parsing (CSSOM Casscade Style Object Model)
During the parsing process of the HTML file, if it runs into a style tag, the CSS file parsing begins in parrel with the HTML parsing. However, the HTML render is blocked until CSSOM rendering is finished.
Render Tree
Once the DOM and CSSOM trees are created, it combines the two to create the Render Tree. The render tree is the visible elements that will be displayed on the browser.
Get Giwon’s stories in your inbox
Join Medium for free to get updates from this writer.
In here, elements with the CSS property “display: none” are excluded. Whereas, “visibility: hidden” is hidden, but included.
Layout Phase (Reflow)
Calculation phase of each elements (Node) of the tree. It calculates the actual size and position of each elements such as width, height, and location of node on the screen. If any changes occurs after the calculation is finished, it restarts this process called the “Reflow” stage.
Paint Phase (Repaint)
Once calculation of each node is finishes, the Paint phases begins. This is the phase where the styling of each node begins. Repaint is when styling is changed. Also, if a reflow phase happens, the repaint phase repeats as well.
Composite Phase
The final phase where the Layout and Paint phase layers are combined and outputted to the browser screen.



![[Study notes] HTTP & HTTPS…](https://miro.medium.com/v2/resize:fit:1358/format:webp/0*yE8in7rsVPp9uXum.jpg)





