Enter the url to a page showing the process of

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/nightwishh/article/details/102630761

We see this issue many times in this to be a record deepen understanding and to talk about their own ideas.
First, with regard to general procedure himself drew a sketch step stepping 123 points.
Here Insert Picture Description
Step analysis:

Step 1. About url address

Generally we enter the url address may have three forms

  • http://121.199.63.22:80
  • http://121.199.63.22
  • http://heyaniu.club

The first: ip address + port number of the
second: ip address
Third: Domain Name

The first form browser can be resolved directly by ip + port number.
The second form is the same as with the first, because browsing the web service default port number is 80, the provisions of the dead, so plus without the same everywhere.
The third domain forms you need to help the DNS domain name resolution system. The browser will request an IP address and port corresponding to the DNS domain name system, the analysis is completed and then returned to the browser.

Step 2. TCP connection - three-way handshake

Give an example of life, step 1 if you want to add someone of micro letter, in person if you can go to (url is entered ip) then you can directly through the micro signal is applied to her, if you do not want to go that may be necessary after the others (DNS server) to help you to help you find sea fishing (resolve domain names) in order to obtain micro signal, step 2 is your friend's request to add someone (server) agreed to establish a friendship (three-way handshake to establish TCP connection), to the next step 3, you can communicate (send http requests, in response to receiving the data).
Here draw a three-way handshake at deepening understanding of the timing chart.
Here Insert Picture Description

Step 3. initiate http request

We have established a good connection can start sending http request, the server receives the http request sent by the browser to start the process, and returns the response data corresponding to the browser at the time of receipt of the response from the server will respond to parse head, if the status code is 302 redirect, then it might make a reverse proxy, the proxy to another page, then the browser will redirect to the server to re-initiate the address http request, parse the contents of the response again, get html parsing, among which there may be a variety of resources and script files, and finally a full page on the show in our browser up.

NOTE: Step 4. Disconnect - Four Wave

Host sends a request to a server connected to the disconnection (at 88 I);

After the server receives the transmission request notified (know);

Disconnect the server sends a notification to the host (that I go);

And sends a disconnect acknowledgment signal (good bye) disconnects from the server after receiving the acknowledgment signal after receiving the disconnection notice the host;

ps:上述请求的协议是http,如果是https还有一个下载证书和加密的过程。写的如果有错误欢迎指正。

Guess you like

Origin blog.csdn.net/nightwishh/article/details/102630761