Basic HTTP knowledge
HyperText Transfer Protocol is the most widely used network Protocol on the Internet. All WWW files must comply with this standard. It is a standard (TCP) for client and server requests and responses ). The client is an end user and the server is a website. By using a Web browser, Web crawler, or other tools, the client initiates an HTTP request to the specified port on the server (the default port is 80) and the server responds to the packet. This article briefly describes some basic knowledge about http and web websites for your reference.
1. What is http?
HyperText Transfer Protocol is the most widely used network Protocol on the Internet.
HTTP is a standard (TCP) for client and server requests and responses ). The client is an end user and the server is a website.
The client (user agent) uses Web browsers, Web crawlers, and other tools to initiate an HTTP request to the specified port on the server (the default port is 80.
The response server stores (some) resources, such as HTML files and images. (We call it) The response server is the origin server ).
Generally, an HTTP client initiates a request to establish a TCP connection to the specified port on the server (port 80 by default.
The HTTP server listens to the requests sent from the client on that port.
Once a request is received, the server (to the client) sends a status line, such as "HTTP/1.1 200 OK" and (response) messages.
The message body may be the requested file, error message, or other information.
Ii. http Protocol version
0.9: expired. Only GET requests are accepted.
1.0: The first HTTP Protocol version specified in communication is still widely used, especially on proxy servers.
1.1: current version. Persistent connections are used by default and can work well with the proxy server.
Multiple requests can be sent in an MPS queue to reduce line load and increase transmission speed.
Iii. concepts related to http
Html:
Hypertext Markup Language (hypertext) indicates that a page can contain images, links, music, programs, and other non-text elements.
Url:
A unified resource locator is a concise representation of the locations and access methods of resources that can be obtained from the Internet. It is the address of a standard resource on the Internet.
Each file on the Internet has a unique URL. It contains information that specifies the location of the file and how the browser should handle it.
Common representation: Protocol: // User name: password @ subdomain name. Domain Name. top-level domain name: Port Number/directory/file name. File suffix? Parameter = value # flag
The most common url protocol is http. Other protocols include https, ftp, mailto, ldap, file, news, gopher, and telnet.
Uri:
A unified resource identifier is a string used to identify an Internet Resource Name. Common Format: protocol name: // domain name. Root Domain Name/directory/file name. suffix
This identifier allows users to interact with any (including local and Internet) resources through a specific protocol.
Uri example, l
Docroot =/var/www/html
/Var/www/html/imags/jpgs/a.jpg