-
Notifications
You must be signed in to change notification settings - Fork 0
EN_CS_Knowledge
somaz edited this page Dec 27, 2023
·
19 revisions
- The user accesses a website using a web browser by entering a URL (e.g., www.example.com).
- The browser retrieves the server's IP address by querying the Domain Name System (DNS).
- The browser establishes a connection with the server using a process known as the 3-Way Handshake.
- The browser sends an HTTP Request to the server to request data.
- The server sends back an HTTP Response, containing the requested data.
- The browser then parses the HTML content received from the server to construct a Document Object Model (DOM) Tree.
- When a Style tag is encountered during the parsing process, the browser temporarily pauses DOM construction to parse CSS and build a CSS Object Model (CSSOM) Tree.
- If a script tag is encountered during parsing, the browser hands over control to the JavaScript engine to parse the JavaScript code, create an Abstract Syntax Tree (AST), and execute the script.
- The browser creates a Render Tree by combining the DOM and CSSOM.
- The series of steps up to this point is called the Construction phase.
- During the next phase, the rendering engine calculates the layout of each visible element and places the nodes in the Render Tree accordingly.
- The UI backend visits each node in the Render Tree and paints the elements on the screen.
- The nodes of the Render Tree are then composited in the correct order to form the final page.
- This series of steps is known as the Operation phase.
- Finally, the web browser displays the fully rendered page to the user.