当前位置:网站首页>2021-10-26 agreement
2021-10-26 agreement
2022-04-22 03:23:00 【Life666888】
One 、 What is an agreement
A protocol or regulation commonly followed by computer communication .
Http The agreement is allowed HTML The language is transferred from the server to the client .
Two 、 The process from sending a request to receiving a request
1. After entering, the browser cache will be read , With cache , If you have a cache , Will read cache , No continue request server .
2.DNS The server performs domain name resolution , Find the corresponding... According to the domain name IP Address .
3. The client and server shake hands three times TCP link .
4. After creating the link, send Request request .
5. Server return Response, Parse the response , The final display page .
3、 ... and 、Url Format
agreement Request address or domain name port (Http Default port 80,https Default 443, If it is other ports, please indicate .) Access path Request parameters .
Four 、HTTP Message structure
1.Request
Request line Request method route HTTP Agreement version No
GET /baidu.com HTTP/1.1
Request header
Accept-Language
Host
Blank line
request Body
2.Response
Returns the line agreement Status code State description HTTP/1.1 200 OK
Returns the first
Content-Type
Contet-Length
Blank line
Body
5、 ... and 、GET and Post difference
1. First GET The request parameter is in Url In the address .Post In the request Body Inside , When the request is sent Post You can directly see the request parameters .
2.GET The request parameter has a length limit ,Post Generally no .
3.GET The data type of the request parameter is limited ,Post No, .
4.GET Can only Url code ,Post Support multiple coding methods .
5.GET The request parameters will be recorded in the browser ,Post Can't .
6.GET Only one request packet will be sent ,Post I'll send it twice , once header once data.
6、 ... and 、 Status code
1 The request is successful To continue processing
100 The request is successful , The client continues to send the rest of the request
2 The request is successful
200 Ask that everything be normal
202 Request received , But the request has not been completed .
3 Redirect
301
302
4 Client error
400 Grammar mistakes
404 Web page not found
5 Server error
503 Server not available
504 Overtime
7、 ... and 、 Request mode
8 Kind of
GET Post Put Header Delete Connect Trace options
8、 ... and 、BC framework CS framework
BS Browser server
CS Client server
Nine 、cookie and session The difference between
1.cookie Record information on the client side , Identify the user .session Is to record information on the server to determine the user identity .
2. because HTTP Protocol is stateless ,cookie In order to make up for the lack of agreement, we introduce cookie Mechanism .
3.cookie Equivalent to the pass issued by the client .
4.Cookie It's actually a short piece of text . The client requests the server , If the server needs to record the user status , Just use response Issue one to the client browser Cookie. The client browser will take Cookie Save up . When the browser requests the site again , The browser links the requested url with the Cookie Submit to the server together .5.cookie Use key-value Form preservation .6.Cookie It is not cross domain . according to Cookie standard , Browser access Google Only carry Google Of Cookie, Not carrying Baidu Of Cookie.7. Chinese belongs to Unicode character , In memory 4 Characters , And English belongs to ASCII character , It's just memory 2 Bytes .Cookie Use in Unicode Characters need to be correct for Unicode The characters are encoded , Otherwise, it will be disorderly .8.cookie except key-value attribute And the expiration date .Maxage=0 Delete Maxage=-1, Shutdown failure ,Maxage Is a positive number , How long will it expire .9.cookie It can be deleted and modified indirectly .10.HTTP Transmission transmission cookie when , Itself is not encrypted , There's a chance of being intercepted .
1.session Is the mechanism for the server to record the status of the client . Accordingly, the storage pressure of the server is increased .
2. When the client accesses the server , The server records information in some form .
3. For higher access speed ,session Generally accessed in memory .
4.session There is a timeout , After time, it will fail .
5.cookie On behalf of the customer ,session On behalf of the customer . adopt cookie ID,session Identify whether the same customer .
difference
1.cookie On the browser ,session On the server .2.cookie unsafe .3. Too many visits session It takes up server performance .4. Single cookie No more than 4k.
11、 ... and 、 Model
OSI Model 7 layer , The physical layer Data link layer The network layer Transport layer The session layer The presentation layer .TCP/IP Model 5 Physical layer Data link layer The network layer Transport layer application layer .
Twelve 、TCP UDP
All belong to the transport layer .TCP Link oriented services 1. First establish a link in the service , Then disconnect the service .2. During transmission , The packet does not need to carry the destination address .3. Ensure the security of transmission .UDP Unlinked Services 1. Don't link in advance , Send data directly .2. Each message has a carry address .3. The reliability of transmission is not guaranteed .
13、 ... and 、TCP Three handshakes and four waves
send out SYN SEQ ACK I want to start linking You can link to Confirm the link. I want to disconnect the link You can disconnect break link Confirm the disconnection .
版权声明
本文为[Life666888]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204211347373898.html
边栏推荐
- Use xamarin to write a beautiful app login and registration interface
- Use js to obtain web page data and format it for output (web page crawling)
- Cognitive system services
- Saas. Data isolation and persistence scheme
- Sword finger offer special breakthrough version 92, flipped characters
- The mountain is high and the road is far away, fearing no danger
- On August 16, 2021, a bug in Zhengfang educational administration system was accidentally found
- Workplace etiquette How to write email
- How to use explicit waiting and implicit waiting in web automation testing?
- 税法18个税种全总结附记忆小口诀
猜你喜欢

Category 7 sorting summary insertion selection exchange quick sorting merge sorting quick rush

Web automation master card in file upload and pop-up processing?

C language multiplication table

How to restrict students in the computer room, get rid of the control of teachers and realize free internet access

Ali II: can the main method be inherited?

2022年当选IEEE Fellow的人员列表
![[cloud computing] three virtual machines complete spark yard cluster deployment and write Scala applications to realize word count statistics](/img/97/3bd0c04dd00d56dc35a8742a7aa0ef.png)
[cloud computing] three virtual machines complete spark yard cluster deployment and write Scala applications to realize word count statistics

Zabbix5 series - making topology map (XIII)

Copy the content of Baidu Library by releasing the monitoring through the browser console

吉他樂理整理
随机推荐
ECMAScript 6 -- Deconstruction and assignment of variables
Rasa dialogue robot serial 1 lesson 121: the whole process demonstration of e-commerce retail dialogue robot operation process debugging of Rasa dialogue robot debugging project - 1
Security technical requirements of password module
leetcode-字典序
Cognitive system services
Record of problems in socket multicast
Ros2 learning notes (III) -- collect and release images of virtual simulation environment
OneFlow 的 Global Tensor 学习笔记和实习总结
Career development and employment guidance for college students MOOC Fuzhou University test questions and answers
Exercise 23, pilot brothers [binary enumeration / bit operation]
Implementation of MySQL dblink and solution of @ problem in password
Category 7 sorting summary insertion selection exchange quick sorting merge sorting quick rush
C language daily question -- xiaolele changing numbers (niuke.com)
Assembly language programming MOOC University of China Zhengzhou University online course test questions and answers
An article takes you to play with C language variables and data types
职场礼仪.怎么写邮件
隊列使用問題總結 queue:work和queue:listen的區別
Promise me not to empty if (obj = null)
Third season recruitment of cognitive computing neuroscience online reading club
College English vocabulary analysis Chinese University MOOC Huazhong University of science and technology