How a web page renders
When we navigate to a web page in our favorite browser, what happens? How do HTML and CSS translate to the page we see in front of us? In other words, how does a web page render?
The following figure shows a flowchart of the process, which is then further explained:
Figure 1.3: Flow chart of the web page render process
To summarize the process:
- The user starts by navigating to a URL, possibly via a hyperlink or by typing the URL into the address bar of their browser.
- The browser will make a
GET
request to the disk or a network. It will read the raw bytes from that location and convert them to characters (based on character encoding, such as UTF-8). - The browser then parses these characters according to the HTML standard to find the tokens that are familiar as HTML elements, such as
<html>
and<body>
. - Another parse is then made to take these tokens and construct objects with their properties based...