Http protocol learning

With the help of [Small Tank: HTTP Protocol Tutorial]

1. What is the HTTP protocol?

Protocols are the rules that computers must abide by in the process of communication. My understanding is that it is similar to the traffic rules that all cars must abide by in the process of driving.

The HTTP protocol is called the Hypertext Protocol, which is a communication protocol that transmits Hypertext Markup Language (HTML) documents from the WEB server to the client's browser. HTTP has a continuously updated version

2. When a web page is opened, the internal processing process of the WEB application

using a proxy server

Proxy: The proxy server is another server between the client and the web server. With it, the browser does not directly go to the web server to retrieve the web page but sends a request to the proxy server, and the signal will be sent to the proxy first server, which is sent to the browser by the proxy server.

------The HTTP protocol is stateless, and it has nothing to do with multiple requests sent by the same client. The server does not know that it is from the same client, (so the web application introduces the Cookie mechanism to maintenance status)

------ Opening a web page requires many requests and responses. As shown in the figure above, when the client receives the HTML of the response for the first time, it finds that many JS files, CSS files, pictures, etc. are referenced in it, so the client The client automatically initiates a request to the server again to obtain these files, and when all files are downloaded, the web page is displayed.

3. Detailed URL

An actual URL: https://www.savingpay.com/web/shop.html?supplierId=37326

URL:scheme://host[:port#]/path/.../[?query-string][#anchor]

scheme: the underlying protocol, such as http\https\ftp

host: IP address or domain name of the HTT server

port: The port of the HTT server, the default is 80, other must be written

path: the path of the resource being accessed

query-string: data to send to the HTT server

anchor: anchor

4、cookie

 

Guess you like

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