current position:Home>HTTP - understand HTTP protocol (I)
HTTP - understand HTTP protocol (I)
2022-05-15 05:15:27【Java white in white】
HTTP- understand HTTP agreement ( One )
Catalog
One 、 The story behind the browser
When we use a browser to browse a web page , Will enter... In the browser ”www.baidu.com“ Website open Baidu web page , And after outputting the web address , What happened to the browser ?
To put it simply , There are the following steps :
- After entering the website ( Domain name ), The browser will edit the URL DNS Domain name resolution , It can be interpreted as IP Address
- And then through IP Address to access Baidu's server , The browser will send HTTP request
- The server receives the request and processes , Then it will respond to the browser , After the browser gets the response data, it parses and renders it
1.HTTP
- Hypertext transfer protocol (HTTP) It's a kind of Communication protocol , It allows hypertext markup language (HTML) Document from Web Browser delivered by server to client
- HTTP It belongs to Object oriented protocol of application layer , Because of its simplicity 、 Fast way , Suitable for distributed hypermedia information system .
2.Web And HTTP
- WEB It's based on hypertext and HTTP Of 、 Global 、 Dynamic and interactive 、 Cross platform distribution Graphic information system
- Based on the Internet A kind of Network services , It provides an intuitive interface for visitors to find and browse information on the network .
Two 、 through TCP/IP see HTTP
1.TCP/IP Protocol family
- TCP/IP Protocol is actually a collection of protocols associated with the Internet
- Hierarchical management is TCP/IP Important features of the agreement
2.TCP/IP Protocol family hierarchy
- TCP/IP Protocol group is a system composed of a four layer protocol , These four layers are : application layer 、 Transport layer 、 Network layer and data link layer
- application layer : It's usually the application we write , Determine the application services provided to users . Application layer can communicate with transmission layer through system call , Such as :FTP、DNS、HTTP etc.
- Transport layer : The transmission layer provides data transmission function between two computers in the network connection to the application layer through system call , There are two different protocols in the transport layer :TCP and UDP
- The network layer : The network layer is used to process packets that flow over the network , A packet is the smallest unit of data transmitted over a network . This layer specifies the path through ( Transmission route ) Get to each other's computer , And transmit the packet to the other party
- The link layer ( Network interface layer ): The link layer is used to handle the hardware part of the connected network , Including control operating system 、 Hardware device drivers 、NIC( network adapter ) And optical fiber and other physical visible parts . The scope of hardware is within the scope of the link layer .
3. Packet encapsulation process
4.HTTP Data transfer process
- When the sender sends data , Data will be transferred from the upper layer to the lower layer , And Each layer will be marked with the header information of that layer . And when the receiver receives the data , Data will be transferred from the lower layer to the upper layer , The header information of the lower layer will be deleted before transmission .
3、 ... and 、DNS Domain name resolution
When we enter the URL in the browser ( domain name ) when , The browser will first pass DNS The server resolves the domain name , It can be interpreted as IP Address , And then through IP Address to WEB Server send HTTP request .
DNS Analytic process
- DNS First, I will check the hosts Whether there is a mapping of this domain name in the file , If you can find the corresponding domain name IP, Then you will directly visit
- If local hosts There is no... In the file , On this machine DNS Look in the parser cache , If you find , Then you will directly visit
- If it's on this machine DNS The parser cache cannot query , Then I will go to Local DNS The server (TCP/IP Preferences set in parameters DNS The server ) Make a request to get IP Address
- If local DNS The server could not get IP Address , Then it will be forwarded , Up one level DNS The server sends for parsing
copyright notice
author[Java white in white],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/131/202205111248303363.html
The sidebar is recommended
- babel7. 0 compatible with IE browser
- Nginx configuring reactrouter browserhistory browserrouter
- JS, react use html2canvas page screenshot and export
- Big data front-end visualization screen -- the road of front-end development
- [a quick introduction and comparison of multiple languages -- JavaScript, typescript, python, golang, trust, Java, ruby]
- Vue element admin login function, token filling, language conversion, routing setting
- Summation of corresponding position elements of multiple lists in Python
- Discussion on HTML page knowledge
- Using Ajax to realize non refresh paging
- HTTP format
guess what you like
Zhang San has a meal - did he eat the difference between get and post in HTTP?
The ultimate actual combat of the most complete tourism project based on spring boot + Vue front-end and back-end separation in history (with source code attached), none of them!!!
Vue basic grammar
LeetCode 217. There are duplicate elements
Pagoda does not configure the solution of SSL site accessing HTTPS and jumping to other websites
Vue3 isProxy
About the problem that the container will hang up after starting nginx in the docker container
Introduction to JavaScript
The core element of large-scale software design is to control complexity. What is the root cause?
What are the core elements of large-scale software design?
Random recommended
- C + + small job - create an array class arr to delete duplicate elements in the array
- Fancy front gradient
- Understanding of this in JavaScript
- Introduction to HTML + CSS Basics
- JavaScript makes a simple "aircraft war"
- Summary of Vue basics 14: what does vuex do?
- CSS introduction
- CSS introduction method
- CSS basic selector
- HTTPS pressure test you don't know
- Intersectionobserver and custom hooks
- Vue uses vis to implement topology map
- [Django CI system] if the front-end date is complete, it will be fully updated to the back-end; If the front-end date is incomplete, the date will not be updated to the back-end-20220510
- Is your endurance anxiety saved? 10 minute full electric vehicle technology is mature, netizen: it's useless to find a charging pile
- After reading 2000 applications for venture capital financing, I summed up the 20 elements that investors value most
- Diesel automobile double pickup truck leads the industry, and Jiangxi Isuzu no longer bows its head and acts recklessly
- Vue + elementui learning notes, use custom events to monitor the closing and opening events of the pop-up window of the introduced component
- Lazy loading usage based on element UI tree directory
- Vue encapsulates multiple request requests (solution for multiple domain names)
- Getting started with Vue
- Vuex getting started from 0 to 1
- Uniapp configuration element UI code block
- HTTP request method security: get, post, put, patch, delete, options, head, trace
- Axios source code analysis - Request interceptor
- Introduction to HTML tag list
- JavaScript output data
- JavaScript comments
- javascript Variables
- Introduction to JavaScript
- HTML and servlet cannot be connected together, and the set servlet cannot be implemented
- The back end returns HTML code. How can the front end preview
- About vue3 0 failed to load SVG through SVG sprite loader
- Antd Vue realizes login login page layout - with verification code verification function - Case
- Find a 5 respectively × 5 the sum of all rows, columns and elements on two diagonal lines of the matrix. (the input data is inconsistent with the output data)
- Raptor flowchart: random function generates a random array. The size of array elements is in the closed range of 100-999 and the length is 10. Find out the largest element and display its position
- How does PHP render some of the following JSON data into HTML
- The requested resource is not available when idea runs the HTML file
- JMeter generates HTML test report
- The spring of Huidong white potted pearl is a restless dream
- Vue3, complex watch implementation, solution For the second time