Discussion on HTTP Communication

Participate in the object

  • The client: All sides that can send requests to the server are clients
    • [web browser] : www.zhufengpeixun.cn:80/stu/index.h…
  • The server side: All that can receive requests from clients and give them some content are servers
    • [High performance computer] : C disk system disk, D disk file disk, blogProject, JS, CSS, IMG
  • Client and server are not just a name for a computer, but a state

process

The developer uploads the source files of the development project to the disk directory specified by the server based on FTP. After the server is connected to the network, the server will have an exclusive external IP address. The DNS domain name resolution server will record the domain name resolution record and generate the following records:

www.zhufengpeixun.cn[domain name] => 42.236.94.137[this is an extemet IP]

(1) First the browser sends a request to DNS

(2) DNS reverse resolution: according to the domain name of the address requested by the browser, go to the DNS server to find the corresponding external IP address of the server: www.zhufengpeixun.cn[domain name] => 42.236.94.137[This is an external IP address]

(3) Send a request to the corresponding server through the external IP (the first access is the server’s WEB site management tool: to be precise, we first create a lot of services on the server based on the tool, when there is a client to visit, the server will match the specific request which service)

(4) Find the corresponding service on the server and the project source file managed by the service through the port number carried in the URL address

(5) The server prepares and processes the content required by the client according to the path name, question mark transmission parameter or hash value in the request address

(6) To prepare the content corresponding to the client (if the request is HTML or CSS resource file, the server returns the source code in the resource file [not the file itself])

(7) The client browser receives the source code returned by the server, and starts to draw and render the page based on its own internal rendering engine (kernel)

  • Firstly, DOM structure is calculated and DOM TREE is generated
  • Run code from top to bottom, load CSS and other resource content
  • Generate a RENDER TREE with styles based on the acquired CSS
  • Start rendering and painting

Learning the front end of Everest training