How browsers display web pages

As a front-end developer, we should know how browsers display web pages, and understanding the principles of browsers can enable designers to find suitable ways to display web pages to users.

First, let's take a look at what a browser is. A web browser is software that displays files on a web server or file system and allows users to interact with those files. It is used to display text, images and other information on the World Wide Web or local area network, etc. The browser is the designer's gallery, where the designer puts the web page to display to the user.

Because there is no fixed standard, the components of different browsers are not exactly the same. But everyone imitates each other and progresses. Basically, the main components of the browser include:

  1. User interface - including the address bar, back/forward buttons, bookmarks directory, etc., that is what you see other than the main window used to display the page you are requesting
  2. Browser Engine - Interface for querying and manipulating the rendering engine
  3. Rendering engine - used to display the requested content, for example, if the requested content is html, it is responsible for parsing html and css, and displaying the parsed results
  4. Network - used to complete network calls, such as http requests, it has a platform-independent interface and can work on different platforms
  5. UI backend - used to draw basic components such as combo boxes and dialog boxes, with a common interface that is not specific to a certain platform, and the bottom layer uses the user interface of the operating system
  6. JS interpreter - used to interpret and execute JS code
  7. Data storage - belongs to the persistence layer. The browser needs to save various data similar to cookies in the hard disk. HTML5 defines the web database technology, which is a lightweight and complete client-side storage technology.

So, how does the browser display the web page? The working principle of the browser can be understood in the following steps:

  1. The browser requests the URL to an application through an HTML form or hyperlink.
  2. The server sends and receives requests from users.
  3. The server executes the specified application that has accepted the creation.
  4. Applications typically perform desired actions based on user input.
  5. The application formats the results into documents that web servers and browsers can understand, what we call HTML pages.
  6. The web server finally returns the result to the browser.

This involves the working principle of the hypertext transfer protocol http (Hypertext transfer protocol). For details, please go to:

http://www.360doc.com/content/13/0422/16/3777348_280148022.shtml

Recommended in-depth study and reading: http://www.iefans.net/liulanqi-ruhe-gongzuo-yuanli/

 

 

 

 

 

 

 

 

 

.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326186137&siteId=291194637
Recommended