A page from the input URL to the page load display completion of the detailed process

Source: Internet
Author: User

Below to visit the Baidu page to do a process analysis

  • Input url:http://www.baidu.com
  • DNS Domain Name resolution
  • The computer does not recognize the domain name, the computer and the computer want to communicate, you must use the IP address to locate the location of the computer
  • In the browser, enter the IP address or domain name, by default you add a 80 port number (the other side of the server is listening to 80 port)
  • 158.12.25.652 domain name is to remember.
  • To remember, so our World Wide Web provides a concept like domain name
  • When you enter the IP address, the browser will automatically find the DNS domain name resolution server,
  • Establish a TCP connection (Socket): Three handshake to ensure that this must be a valid request and response, this three-time handshake in the industry believe that most people are not unfamiliar, although it is to improve the effectiveness of transmission, but this leads to the direct problem is the entire transmission process is very time-consuming, That is, each HTTP request will undergo three handshake this process, the time consumed is self-evident, and the traditional HTTP protocol requires a request can only request a file, so some top-level Web site to take a few attempts to reduce the HTTP request policy, Most is to take an HTTP request can request multiple files such an implementation, it is gratifying that http2.0 has been able to support the ability to request more than one HTTP file, this is worth looking forward to all the implementation, but certainly need a period of time, slowly to wait for the implementation of it.
  • Encapsulates a user-entered address into an HTTP request request message sent to the server
  • The browser encapsulates the URL address entered by the user into an HTTP request message (Request header + Request line + request body) According to the HTTP protocol
  • The message is simply a string, and will eventually be turned into binary data and sent to the server
  • The backend server receives the user HTTP request message
  • The backend server receives the data that the client sends to itself (binary data)
    • First, the binary data is parsed into characters according to the code (which humans can identify)
    • Parsed into characters, then resolved in the format defined in the HTTP protocol specification
  • Background server processes user request information

  • When a user request message is received, based on the Get, port or URL in the request message, or the query string in the URL or the data in the request body
  • Specific processing based on the user's specific request data
  • The backend server encapsulates the corresponding results into an HTTP Response response message sent to the client
  • After we parse and process the user request message
  • The server begins to encapsulate the specific data to be sent to the client according to the HTTP protocol specification as an HTTP protocol response message
  • Response header, Response field, response body
  • The data is also a string with a specific format, and eventually the string is converted into binary data sent to the client
  • Sent to the client is also sent through the Socket (IP address, port number) to the customer order
  • The user's browser receives a response and begins rendering HTML, CSS, parsing, and executing JavaScript code
  • When the client resolves the binary data sent over to the server
  • The client browser will also parse the binary data into a string based on the encoding type
  • Then, according to the HTTP protocol, the response message sent by the server is resolved.
  • Then, according to the message content in the response message (message header, newspaper style) to do the specific analysis
  • When the browser encounters some static resources during parsing, it repeats the above steps again

A page from the input URL to the page load display completion of the detailed process

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.