当前位置:网站首页>[network planning] 2.2.3 user server interaction: cookies
[network planning] 2.2.3 user server interaction: cookies
2022-06-11 00:27:00 【ChuHao H】

This article is based on 《 computer network —— top-down approach 》 A Book
Interaction between user and server :cookie
HTTP The server is stateless ( That is, the information of the client requesting the service is not recorded ), But sometimes Web The site wants to be able to identify users , To realize functions such as restricting user access and identifying user identity . So ,Web The site uses cookie technology ( Be careful :cookie Do not belong to HTTP agreement , He is supplementary HTTP Technologies that are not functional in some way )
cookie There are four components :
- stay HTTP One... Is reserved in the response message cookie Head office
- stay HTTP One... Is reserved in the request message cookie Head office
- One... Is reserved in the client system cookie file , And managed by the user's browser
- be located Web A management of the site cookie Back end total database
and cookie The function process of is as follows :
When a user first visits the site , The site will generate a unique identification code , And use this as an index to generate a table entry in the back-end database . And in response to the Set-cookie The first line sends the ID back to the client . After the customer receives the response message , Will be in Set-cookie The identification code in is stored in the... Of the client cookie In file . When the user continues to browse the website , One per request Web page , Its browser will query cookie File and extract her ID for the site , And put the identification code in HTTP Requesting a message Cookie In the first line .
If the user visits the site again after a week , His browser will send the corresponding cookie Put in request message header .
边栏推荐
- Things about Bluetooth development (1) -- starting with packet capturing data
- sql 语句--输入 月份 查日期(年月日),输出 月份
- Chapter 2 application layer 2.4 DNS
- Database table structure
- canvas绘画折线段
- Yii2 ActiveRecord 使用表关联出现的 id 自动去重问题
- Room第一次使用
- CSDN daily practice -- half search of ordered table
- LeetCode 1673. Find the most competitive subsequence**
- f‘s‘f‘s‘f‘s‘d
猜你喜欢

452. detonate the balloon with the minimum number of arrows
![[pyGame games] here it is. This Gobang game is super A. share it with your friends~](/img/76/faea3558ed6fadff755c517922088b.png)
[pyGame games] here it is. This Gobang game is super A. share it with your friends~

The website is harmed by XSS hanging horse

Décomposition détaillée du problème de chemin le plus court du graphique

MP框架基本操作(自用)

unity 网格面片生成抛物线,折线

String time sorting, sorting time format strings

VTK example -- three intersecting planes

【无标题】4555
![[untitled] test](/img/6c/df2ebb3e39d1e47b8dd74cfdddbb06.gif)
[untitled] test
随机推荐
Rich text activity test 1
JVM garbage collection mechanism and common garbage collectors
Multipass Chinese documentation - Tutorial
Yum source update
[opencv practice] in cold winter, there will be a rainbow. Do you love this special effect?
Docking request mode
Blog recommendation | building IOT applications -- Introduction to flip technology stack
[untitled] test
Static method static learning
[no title] 66666
Njupt Nanyou Discrete Mathematics_ Experiment 3
From the perspective of Confucius Temple IP crossover, we can see how the six walnuts become "butterflies" for the second time
[pyGame games] here it is. This Gobang game is super A. share it with your friends~
Word在目录里插入引导符(页码前的小点点)的方法
【JVM】线程
[database] MySQL index interview questions
SQL statement -- enter the month, query the date (month, year, day), and output the month
[pyGame] stir up your brain and play the "24 o'clock" idea together ~ (awesome)
Chapter 2 application layer 2.4 DNS
Leetcode-209 minimum length subarray