Recently I came to know about Reflow and Repaint. How it's affecting web performance. I am writing this post to give insights about reflow and repaint. Before Jumping into the topic, let's understand how the browser renders the website.
- When the user enters the URL, It will fetch the HTML source code from the server
- Browser Parse the HTML source code and convert into the Tokens (<, TagName, Attribute, AttributeValue, >)
- The Tokens will convert into the nodes and will construct the DOM Tree
- The CSSOM Tree will generate from the CSS rules
- The DOM and CSSOM tree will combine into the RenderTree