Basic knowledge: What does http mean before a website address?

Basic knowledge: What does http mean before a website address?

What is HTTP?
When we want to browse a website, we just need to enter the website address in the address bar of the browser, for example, www.jb51.net, but what appears in the address bar of the browser is: https://www.jb51.net. Do you know why there is an extra "http"?
1. What is HTTP protocol? The website address we enter in the address bar of the browser is called URL (Uniform Resource Locator). Just as every home has a house address, every web page has an Internet address. When you enter a URL in the address box of a browser or click a hyperlink, the URL identifies the address to be browsed. The browser uses the Hypertext Transfer Protocol (HTTP) to extract the web page code from the site on the web server and translate it into beautiful web pages. Therefore, before we understand HTTP, it is necessary to first understand the composition of the URL, for example: https://www.jb51.net. It means the following:
1. http://: stands for Hypertext Transfer Protocol, which notifies the microsoft.com server to display the web page. Usually, you do not need to enter it.
2. www: represents a Web (World Wide Web) server;
3. Microsoft.com/: This is the domain name of the server that hosts the web page, or the name of the site server;
4. China/: is a subdirectory on the server, just like our folder;
5. Index.htm: index.htm is an HTML file (web page) in a folder.
We know that the basic protocol of the Internet is the TCP/IP protocol. However, the top layer of the TCP/IP model is the application layer, which contains all high-level protocols. High-level protocols include: File Transfer Protocol FTP, Email Transfer Protocol SMTP, Domain Name System Service DNS, Network News Transfer Protocol NNTP and HTTP protocol, etc.
HTTP (Hypertext Transfer Protocol) is a transmission protocol used to transfer hypertext from a WWW server to a local browser. It can make browsers more efficient and reduce network traffic. It not only ensures that computers transmit hypertext documents correctly and quickly, but also determines which part of the document is transmitted and which part of the content is displayed first (such as text before graphics). This is why the web addresses you see in your browser all start with http://.
Since the birth of WWW, a colorful information and virtual world have appeared before our eyes, but how can we find the information we need more easily? When it was decided to use hypertext as the standard format for WWW documents, scientists immediately developed a protocol in 1990 that could quickly search these hypertext documents, namely the HTTP protocol. After several years of use and development, it has been continuously improved and expanded. The sixth version of HTTP/1.0 is currently used in the WWW.
How HTTP works

Now that we understand the structure of a URL, how does HTTP work? We will discuss this issue next.
Because the HTTP protocol is based on a request/response paradigm (equivalent to client/server). After a client establishes a connection with a server, it sends a request to the server in the following format: Uniform Resource Identifier (URL), protocol version number, followed by MIME information including request modifiers, client information, and possible content. After receiving the request, the server gives the corresponding response information in the format of a status line, including the protocol version number of the information, a success or error code, followed by MIME information including server information, entity information and possible content.
Most HTTP communications are initiated by a user agent and consist of a request for a resource on an origin server. The simplest case is probably accomplished over a single connection between the user agent and the server. On the Internet, HTTP communication usually occurs over TCP/IP connections. The default port is TCP 80, but other ports are available. But this does not mean that the HTTP protocol can only be implemented on top of other protocols on the Internet or other networks. HTTP only implies a reliable transport.
This process is just like when we call to place an order. We can call the merchant and tell him what specifications of goods we need, and then the merchant will tell us which goods are in stock and which are out of stock. For these, we communicate by phone over telephone lines (HTTP is via TCP/IP), and of course we can also communicate by fax, as long as the merchant has a fax machine.
The above briefly introduces the macroscopic operation mode of HTTP protocol. The following introduces the internal operation process of HTTP protocol.
In WWW, "client" and "server" are relative concepts and only exist during a specific connection, that is, a client in one connection may act as a server in another connection. The information exchange process in the client/server model based on the HTTP protocol is divided into four processes: establishing a connection, sending request information, sending response information, and closing the connection. This is just like the example above, the entire process of our telephone ordering.
In fact, to put it simply, any server, in addition to HTML files, also has an HTTP resident program to respond to user requests. Your browser is an HTTP client that sends requests to the server. When you enter a start file in the browser or click a hyperlink, the browser sends an HTTP request to the server. This request is sent to the URL specified by the IP address. The resident program receives the request, performs necessary operations, and then returns the requested file. In this process, the data sent and received on the network has been divided into one or more packets. Each packet includes: the data to be transmitted; control information, which tells the network how to handle the data packet. TCP/IP determines the format of each data packet. If you were not told in advance, you would not know that information is broken into many small pieces for transmission and then reassembled.
That is to say, in addition to owning the goods, the merchant also has a staff to answer your calls. When you make a call, your voice is converted into various complex data and transmitted to the other party's phone through the telephone line. The other party's phone then converts the various complex data into sound so that the staff of the other merchant can understand your request. You don't need to understand how sound is converted into complex data in this process.

<<:  A detailed introduction to seata docker high availability deployment

>>:  The difference between br and br/ in HTML

Recommend

Description of meta viewport attribute in HTML web page

HTML meta viewport attribute description What is ...

Related operations of adding and deleting indexes in mysql

Table of contents 1. The role of index 2. Creatin...

Implementation steps for enabling docker remote service link on cloud centos

Here we introduce the centos server with docker i...

Getting Started with Vue 3.0 Custom Directives

Table of contents 1. Custom instructions 1. Regis...

The difference between key and index in MySQL

Let's look at the code first: ALTER TABLE rep...

Issues installing Python3 and Pip in ubuntu in Docker

text 1) Download the Ubuntu image docker pull ubu...

Example of stars for CSS rating effect

What? What star coat? Well, let’s look at the pic...

Dynamic SQL statement analysis in Mybatis

This article mainly introduces the dynamic SQL st...

Summary of MySql index, lock, and transaction knowledge points

This article summarizes the knowledge points of M...

About MySQL 8.0.13 zip package installation method

MySQL 8.0.13 has a data folder by default. This f...

An IE crash bug

Copy code The code is as follows: <style type=...

React's method of realizing secondary linkage

This article shares the specific code of React to...

Detailed explanation of formatting numbers in MySQL

Recently, due to work needs, I need to format num...