Front-end interview - the whole process from entering URL to page loading (2)

The previous article has introduced some data interactions that occur during the data request process when the URL is loaded and the interview points that may exist in the interview. This article continues to introduce the content of the data rendering part in "The whole process from inputting URL to page loading". This article can also be said to be a simplified introduction to the browser rendering process.

data rendering

When the data request returns the corresponding result (html file) on the server, the browser will render the page according to the returned Html file. From getting the data to finally displaying it on the page, the browser has also done a lot of work. The general principle Refer to the figure below.

insert image description here

  • The browser parses the HTML and builds the DOM number
  • Parse CSS and build a Style Tree rule tree
  • Build Render Tree through DOM Tree and style Rules
  • Interface node calculation layout through Render Tree
  • drawing interface

The general process is the same as the above illustration and the rendering process listed. Next, we will use the following questions to understand the rendering process of the web page from the side.

1. What is a process and what is a thread? What is the difference between them?

Apply a more official definition to first explain the definition of processes and threads.
Process: A process refers to an application that is running in the system&

Guess you like

Origin blog.csdn.net/chf1142152101/article/details/126873248