Before learning http, https, http/2, first sort out the OSI network model, TCP/IP protocol, TCP and UDP and other contents.
1. A brief review of the OSI seven-layer network model
OSI is an open communication system interconnection reference model and a protocol specification proposed by the International Organization for Standardization. The model from top to bottom is:
Application layer (OSI application layer protocols include File Transfer, Access and Management Protocol (FTAM), as well as File Virtual Terminal Protocol (VIP) and Public Management System Information (CMIP))
Presentation layer (the presentation layer provides multiple functions for encoding and converting application layer data to ensure that information sent by one system application layer can be used by another A system application layer identification)
Session layer (the session layer establishes, manages and terminates communication sessions between the presentation layer and entities)
Transport layer (the transport layer provides reliable end-to-end network data flow services to higher layers)
Network layer (the network layer is responsible for establishing connections between sources and destinations)
Data link layer (data link layer provides data transmission through physical network links. Different data link layers define different network and protocol characteristics, including physical addressing, network topology, Error checking, data frame sequence and flow control)
Physical layer (the physical layer is responsible for finally encoding the information into current pulses or other signals for network transmission)
2. TCP/IP protocol
The TCP/IP protocol integrates multiple protocols such as TCP and IP to handle the transmission between the computer and the network. It refers to and integrates the OSI network model. The common TCP/IP protocol is divided into four layers, from top to bottom:
Application layer (the application layer corresponds to the application layer and presentation layer of the OSI seven-layer reference model)
Transport layer (the transport layer corresponds to the transport layer of the OSI seven-layer reference model, which provides two end-to-end communication services)
Network Intermediate layer (this layer includes IP protocol, RIP protocol (Routing Information Protocol, Routing Information Protocol), and is responsible for data packaging, addressing and routing. It also includes the Internet Control Message Protocol (ICMP) for Provide network diagnostic information)
Network interface layer (The network interface layer includes protocols for coordinating the transmission of IP data over existing network media)
3. TCP and UDP
TCP (Transmission Control Protocol, Transmission Control Protocol)
is a connection-oriented, reliable, byte stream-based transport layer communication protocol. UDP (User Datagram Protocol) is a simple datagram-oriented transport layer protocol. They are responsible for the processing of the transport layer in the OSI network model.
A simple comparison between TCP and UDP:
| TCP | UDP |
|---|---|
| Connection-oriented (three-way handshake, four-way wave) | No connection |
| Uses more resources | Reduced resource usage |
| Ensure data order | No data order |
| Slower transmission speed | Transmission Fast speed |
| Ensure data correctness | Easily lose packets |
| Stream mode | Message mode |
4. HTTP
http (Hypertext Transfer Protocol) is a protocol commonly used at the application layer. It is based on text transmission content.
Eight request methods
get, post, head, put, delete, trace, options, connect.
http request information structure
Request line
Request header
Blank line
Other messages
Status code
1xx Message - The request has been processed by the server Receive, continue processing
2xx Success - the request has been successfully received, understood, and accepted by the server
3xx Redirect - follow-up required operation to complete this request
4xx Request error - the request contains a lexical error or cannot be executed
5xx Server error - the server is in An error occurred while processing a correct request
Common status codes 200 (request successful), 302 (redirected to some url), 304 (read cache), 404 (not found) file or directory), 405 (the method specified in the request is wrong), 500 (server error), 502 (server invalid response)
5. HTTPS
https can be called the http secure version, mainly SSL (Secure Socket Layer) or TSL (Transport Layer Security) is added under http, and SSL or TSL encrypts the data at the transport layer.
Features of https:
1. Ensure the security of transmitted information (encrypted)
2. Need to apply for a certificate
3. Can prevent operator hijacking
4. Due to the added security layer, the access speed is slowed down
5. HTTP websites can access https links, but https websites cannot access http links (except for some browsers that support mixed-content)
6. SPDY
Spdy is Google's open network transmission protocol. It is located between the http and ssl layers and can speed up access.
Features of spdy:
1. Can reduce latency
2. Can set request priority
3. Header compression
4. Ensure transmission security based on https
5. Support server push
7. HTTP/2
http/2 (Hypertext Transfer Protocol Second Edition), he made some upgrades to http, and also referred to spdy-related content (Can be called an evolved version of spdy).
Features of http/2:
New binary format
Multiplexing
Header compression
Support server push
The difference between http/2 and spdy:
http/2 supports http transmission, spdy only supports https
The header compression algorithms of http/2 and spdy are different
Reference article
The difference between TCP and UDP
Some things you should know about HTTP, HTTP2.0, SPDY, HTTPS
In-depth explanation - Seven-layer network model &&network data packet
The above is the detailed content of Knowledge about http, https, http/2. For more information, please follow other related articles on the PHP Chinese website!
HTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AMThe roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.
HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AMHTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.
HTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AMHTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.
From Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AMHTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.
Understanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AMWebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.
The Role of HTML: Structuring Web ContentApr 11, 2025 am 12:12 AMThe role of HTML is to define the structure and content of a web page through tags and attributes. 1. HTML organizes content through tags such as , making it easy to read and understand. 2. Use semantic tags such as, etc. to enhance accessibility and SEO. 3. Optimizing HTML code can improve web page loading speed and user experience.
HTML and Code: A Closer Look at the TerminologyApr 10, 2025 am 09:28 AMHTMLisaspecifictypeofcodefocusedonstructuringwebcontent,while"code"broadlyincludeslanguageslikeJavaScriptandPythonforfunctionality.1)HTMLdefineswebpagestructureusingtags.2)"Code"encompassesawiderrangeoflanguagesforlogicandinteract
HTML, CSS, and JavaScript: Essential Tools for Web DevelopersApr 09, 2025 am 12:12 AMHTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Linux new version
SublimeText3 Linux latest version

Dreamweaver CS6
Visual web development tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.







