[Illustrated HTTP reading notes] Chapter 1: Understanding the Web and Network Basics


This chapter outlines what technology the Web is built on, and how the HTTP protocol was born and developed.

1.1 Use HTTP protocol to access the Web

When we enter the URL in the web address bar, how does the web page appear?
I wrote previous blogs before: from entering the URL in the browser to finally seeing the page content, what processes did you go through?
Insert picture description hereURL specified in the address bar of the web browser, the web browser starts fromWeb serverThe terminal obtains information such as resource files and displays it on the Web page.

Here the web browser is what we callClient

Insert picture description here
A protocol is used between the client and the server, namely HTTP (Hypertext Transfer Protocol). An agreement is a kind of stipulation made by the communication parties.

1.2 Birth of HTTP

1.2.1 Planning the Web for knowledge sharing

In March 1989, the Internet still belonged to a few people. In this dawn of the Internet, HTTP appeared.
Insert picture description here
Dr. Tim Berners-Lee of CERN proposed an idea that allows researchers in two places to share knowledge.
The original idea was to connect the hypertext formed by the interrelation of multiple documents into a WWW (World Wide Web) that can be referred to each other.
Three WWW construction technologies have been proposed:

  • SGML (Standard Generalized Markup Language): HTML (Hypertext Markup Language) as the text markup language for pages
  • HTTP: Document Delivery Protocol
  • URL: Specify the address of the document

The name WWW is the name of the client application used by Web browsers to browse hypertext. Now it is used to represent this series of collections, which can also be referred to as the Web for short.

1.2.2 Web Growth Era

In November 1990, CERN successfully developed the world's first web server and web browser.

  • Japan's first homepage (September 1992)
  • HTML1.0 (1990)
  • NCSA Mosaic bounce page (1993年1月)
  • The NCSA HTTPd Home Page(1993年秋)

1.2.3 Stopping HTTP

  • HTTP/0.9 (version before 1.0)
  • HTTP/1.0 (May 1996)
  • HTTP/1.1 (January 1997)

1.3 Network basic TCP/IP

The network we usually use operates on the basis of the TCP/IP protocol suite. And HTTP belongs to a subset of it. (After reading this book, the graphic TCP/IP will be updated later)

1.3.1 TCP/IP protocol family

For computers and network devices to communicate with each other, both parties must be based on the same method. Both parties can communicate according to the same rules, and we call this ruleprotocol

Insert picture description here
Collecting protocols associated with the Internet like this is collectively called TCP/IP.

1.3.2 Layered management of TCP/IP

The TCP/IP protocol family is divided into the following four layers according to levels:Application layerTransport layerNetwork layerdata link layer.
The benefits of layering: the design of each layer can be freely changed. The design has also become simple.
For example, the application of the application layer can only consider the tasks assigned to itself, without having to figure out where the other party is on the earth, what the other party's transmission route is, and whether the transmission can be guaranteed. This will be considered by other layers.

The role of each layer of the TCP/IP protocol family:
Insert picture description here
(This picture is divided into five layers)
Application layer

  • The application layer determines the communication activities when providing application services to users.
  • Various general application services are pre-stored in the TCP/IP protocol suite. For example: FTP (File Transfer Protocol) and DNS (Domain Name System) services are two of them.

The HTTP protocol is also at this layer.

Transport layer

  • The transport layer provides data transmission between two computers in a network connection to the upper application layer.
  • There are two different protocols in the transport layer:TCP(Transmission Control Protocol) andUDP(User Datagram Protocol)

Network layer (network interconnection layer)

  • The network layer is used to process data packets flowing on the network.
  • A data packet is the smallest unit of data transmitted over the network.
  • This layer specifies the path through which to reach the other party's computer and transmits the data packet to the other party.
  • When communicating between computers, the function is to choose a transmission route among many options .

Link layer (data link layer)

  • Used to handle the hardware part of the connection network.

1.3.3 TCP/IP communication transport stream

Insert picture description here
When using the TCP/IP protocol suite for network communication, it will communicate with the other party in a hierarchical order. The sending end goes down from the application layer, and the receiving end goes up from the link layer.
You can refer to: From entering the URL in the browser to finally seeing the content of the page, what processes did you go through?
Insert picture description here
The method of packaging data information becomesPackage

1.4 Protocols closely related to HTTP: IP, TCP and DNS

1.4.1 IP protocol responsible for transmission

  • According to the hierarchy, the IP Internet Protocol is located at the network layer
  • IP and IP address must be distinguished clearly, "IP" here is a protocol name
  • The role of the IP protocol is to transmit various data packets to each other. And to ensure the correct transmission requires two conditions: IP address and MAC address (will be updated later on the network protocol will talk about, IP address is the communication address of a network card in the network world, equivalent to our real world house number. MAC address It's more like an ID number, which is a unique identifier. I'll talk about it later)
  • The IP address indicates the address to which the node is assigned, and the MAC address refers to the fixed address to which the network card belongs.

Use ARP protocol to communicate with MAC address

  • Communication between IPs depends on the MAC address.
  • The ARP protocol is a protocol used to resolve addresses, and the corresponding MAC address can be retrieved based on the IP addresses of the communicating parties. (I'm a little hesitant here... I will go back and have a look to discuss the network protocol)

No one can fully grasp the transmission status
in the Internet. During the transfer process before reaching the communication target, those network devices such as computers and routers can only learn a very rough transmission route. This mechanism is calledRouting, A bit like the delivery process of a courier company.
Insert picture description here

1.4.2 TCP protocol to ensure reliability

You can refer to the previous article:
Detailed explanation of the ten characteristics of the TCP protocol (on)

Detailed explanation of ten features of TCP protocol (in)

Detailed explanation of ten characteristics of TCP protocol (below)

  • Classified by level, TCP is located at the transport layer and provides reliable byte stream services. (Byte stream service refers to the division of large blocks of data into data packets in units of segments for management in order to facilitate transmission.)
  • For byte stream services, the TCP protocol divides data for easier transmission of large data. And the TCP protocol can confirm whether the data is finally sent to the other party.

Ensure that the data can reach the goal

  • Three-way handshake For
    Insert picture description here
    other features, see the link above.

1.5 DNS service responsible for domain name resolution

  • The DNS service is a protocol at the application layer like the HTTP protocol. It provides resolution services from domain names to IP addresses.
  • Computers can be assigned IP addresses, as well as host names and domain names. For example: www.hackr.jp
  • We usually visit through the domain name, rather than directly through the IP address.
  • For the computer to understand, it needs to convert the domain name into an IP address, and then DNS service is needed to get from the domain name to the IP address.
    Insert picture description here

1.6 The relationship between various protocols and HTTP protocol

Insert picture description here

1.7 URI sum URL

  • URI: Uniform Resource Identifier
  • URL: Uniform Resource Locator

1.7.1 Uniform Resource Identifier

URI(Uniform Resource Identifier)。

  • Uniform stipulates that a unified format can facilitate the processing of more different types of resources, rather than identifying resource-specific access methods based on context.
  • The definition of Resource is "anything that can be identified"
  • Identifier represents an identifiable object (identifier).

In summary, URI is the location identifier of the resource represented by a certain protocol scheme. The protocol scheme refers to the name of the protocol type used to access the resource.

When using the HTTP protocol, the protocol scheme is http, in addition to: ftp, mailto, telnet, file, etc.

URI uses a string to identify a certain Internet resource, and URL represents the location of the resource. The visible URL is a subset of RUI.
Insert picture description here

1.7.2 URI form

Absolute URI format:
Insert picture description here

  • Login information: username and password
  • Server address: Use absolute URI must specify the server address with access
  • Server port number: Specify the network port number of the server connection
  • File path with hierarchy: locating specific resources
  • Query string
  • Fragment identifier

"references"

Graphical HTTP
fun talk about network protocol

Deep understanding of HTTP protocol

Detailed explanation of ten characteristics of TCP protocol (part 1)

Detailed explanation of ten features of TCP protocol (in)

Detailed explanation of ten characteristics of TCP protocol (below)

From entering the URL in the browser to finally seeing the content of the page, what processes did you go through?

Guess you like

Origin blog.csdn.net/weixin_45532227/article/details/112720811