What happens when we type in the URL and hit Enter? Searching for the server IP address: 1. Query 2 in the local hosts file. Query in the browser cache. 3. Query information in the system cache. 4. Query information in the router cache. 5. Query the IP address on the DNS server until the IP address is found. 6. Establish a connection with the Web server over TCP. 7. The browser receives the response and begins to download and render the page in front of us. The browser receives the HTML code, which is parsed from top to bottom: Construct DOM tree + construct CSSOM => render tree (parse — construct Object Model) Encountered script files and CSS files will be another thread to download; The embedded script tag and the style tag will be executed directly, blocking the DOM tree and THE CSS rule tree respectively, regardless of the embedded script script, external chain script download will block the construction of the DOM tree; The CSS file execution and the embedded style tag block CSSOM until after the DOM tree and CSSOM rules are generated, the browser combines the two to generate the RenderTree, which the browser draws onto the page, rendering page \ for the first time

Finally, after the JS script at the bottom of the body is downloaded, the DOM is modified through THE DOM API and the style is modified through the CSSOM API. Each modification will result in the relayout and redrawing of the rendering tree, namely the Reflow. For color modification, only Repaint will be used, not Reflow

\

Note: Welcome to join the web front-end job hunting qq group: 668352707\