当前位置:网站首页>Cookies and sessions
Cookies and sessions
2022-07-29 01:13:00 【:D...】
Cookie
Cookie yes po; Generated by the server , Send it to the browser , The browser will Cookie Of key/value Save to a text file in a directory , Automatically send this... The next time you request the same website Cookie To server
Cookie Can be used in some WEB Persistent state between site sessions
Session
Session It's another mechanism for recording customer status , be based on Cookie Realization , When the client browser accesses the server , The server records client information in some form on the server , This is it. Session, The client browser only needs to access from Session To find the status of the customer
Differences and connections
contact
Cookie and Session Both are mechanisms for recording customer status
difference
1: Different storage locations
cookie The data information is stored on the client browser .
session The data information of is stored on the server .
2: Different storage capacity
Single cookie Saved data <=4KB, A site can save at most 20 individual Cookie.
about session There is no upper limit , But for the sake of server-side performance ,session Don't store too many things in the , And set up session Delete mechanism .
3: Different storage methods
cookie You can only keep ASCII character string , And it needs to be stored as Unicode Character or binary data .
session Can store any type of data , Including but not limited to string,integer,list,map etc. .
4: Different privacy policies
cookie Visible to clients , People with ulterior motives can analyze the data stored locally cookie And carry on cookie cheating , So it's not safe .
session Store on the server , It's transparent to the client , There is no risk of sensitive information leaking .
5: Cross domain support is different
cookie Support cross domain access .
session Cross domain access is not supported .
Cookie Working schematic diagram

Session Working schematic diagram

JWT token Working schematic diagram 
边栏推荐
- Wechat campus bathroom reservation applet graduation design finished product (8) graduation design thesis template
- TextKit 自定义UILabel识别链接
- Seven SQL performance optimizations that spark 3.0 must know
- Machine learning | matlab implementation of RBF radial basis function neural network Newrbe parameter setting
- Necessary interview skills for Android (including interview questions and learning materials)
- QT静态编译程序(Mingw编译)
- [Commons lang3 topic] 001 stringutils topic
- 状态压缩dp-蒙德里安的梦想
- 面试官:程序员,请你告诉我是谁把公司面试题泄露给你的?
- Wechat campus bathroom reservation for the finished product of applet graduation design (7) mid term inspection report
猜你喜欢
![[unity] configure unity edit C as vscode](/img/f6/5675a96115fb97737c8b36a3fcc6ed.png)
[unity] configure unity edit C as vscode
![[AD learning] the course of PCB drawing in this marine vehicle competition](/img/37/211a0557848f6922fda7a69a114923.png)
[AD learning] the course of PCB drawing in this marine vehicle competition

B-tree~

Interview shock 69: is TCP reliable? Why?

Univariate function integration 1__ Indefinite integral

Thread lock and its ascending and descending levels

Irregular clipping of NC data with CDO

表达式求值

如何在WordPress中创建一个自定义404错误页面
![[Jenkins' notes] introduction, free space; Continuous integration of enterprise wechat; Allure reports, continuous integration of email notifications; Build scheduled tasks](/img/0f/f75603616bd54039f8ccfa3e024768.png)
[Jenkins' notes] introduction, free space; Continuous integration of enterprise wechat; Allure reports, continuous integration of email notifications; Build scheduled tasks
随机推荐
[AD learning] the course of PCB drawing in this marine vehicle competition
Univariate function integration 1__ Indefinite integral
【AD学习】本次海上航行器大赛画pcb图的历程
Self-attention neural architecture search for semantic image segmentation
[Commons lang3 topic] 001 stringutils topic
Wechat campus bathroom reservation applet graduation design finished product (8) graduation design thesis template
RHCE命令练习(一)
Self made | a 16 bit RISC architecture CPU is self-made by hand
In the second round, 1000 okaleido tiger were sold out in one hour after logging in to binance NFT again
System Verilog common syntax
[Commons lang3 topic] 003- randomstringutils topic
机器学习 | MATLAB实现RBF径向基神经网络newrbe参数设定
数字孪生轨道交通:“智慧化”监控疏通城市运行痛点
深度学习 | MATLAB实现TCN时间卷积神经网络spatialDropoutLayer参数描述
MySQL stored procedure realizes the creation of a table (copy the structure of the original table and create a new table)
Beginner's Guide to electronic bidding
The method of tracking the real-time market of London Silver
How to deal with the time, scope and cost constraints in the project?
How to check the redis Version (check the redis process)
RHCE命令练习(二)