To parse is to analyze and convert a program that a runtime environment can run.

Order of component file parsing

What is parsing?

Parsing is an action in which the component files are loaded in the correct order as the browser loads the web page sent by the server.

  1. HTML is parsed first.
  2. The browser then finds any <link> references linking to CSS stylesheets and <script> references linking to JavaScript files.
  3. Using the reference found, the browser parses the appropriate CSS and JavaScript files.
  4. The browser generates an in-memory Document Object Model (DOM) tree from the parsed HTML, generates an in-memory CSSOM structure from the parsed CSS, and compiles and executes the parsed JavaScript.
  5. Using the information from the DOM and CSSOM trees, the browser rebuilds the page and presents it on the screen to the user.

Another fun analogy → parsing

Imagine that, in the server, the component files are like people in a line with an assigned number from 1 to 5. The people assigned those numbers then get on the bus but they can sit wherever they like. When they get to their destination, they exit the bus and enter through the gates of their destination in the same order that they were in according to their assigned number. In this case, it seems like multiple items are parsed all at once according to what parts of the CSS and JavaScript the HTML file references in its code.

Link to original

External links and sources

Related