当前位置:网站首页>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 
边栏推荐
- 时序预测 | MATLAB实现TCN时间卷积神经网络的时间序列预测
- 双链表的定义 ~
- nep 2022 cat
- Introduction to FLV documents
- New pseudo personal guide page source code
- Visual full link log tracking
- Instruction rearrangement, happens before, as if serial
- [Commons lang3 topic] 005- objectutils topic
- 18张图,直观理解神经网络、流形和拓扑
- How to create a custom 404 error page in WordPress
猜你喜欢

FLV文件简介

New pseudo personal guide page source code

进程和线程知识点总结1

Day2:三种语言暴刷牛客130题

【Leetcode-滑动窗口问题】

State compression DP Mondrian's dream

Hash table~

The digitalization of the consumer industry is upgraded to "rigid demand", and weiit's new retail SaaS empowers enterprises!
![[web development] basic knowledge of flask framework](/img/79/5ece84552c82e98f5e15fac1ee3335.png)
[web development] basic knowledge of flask framework

【树莓派】widows电脑如何与树莓派连接
随机推荐
【刷题笔记】链表内指定区间反转
LeTax记录\documentclass{},authoryear属性使用
Talk about the cross end technical scheme
What are the methods to track the real-time market of London Silver?
面试官:程序员,请你告诉我是谁把公司面试题泄露给你的?
双链表的定义 ~
Spark 3.0 中七个必须知道的 SQL 性能优化
[raspberry pie] how does the windows computer connect with raspberry pie
Instruction rearrangement, happens before, as if serial
Oozie工作调度
nep 2022 cat
B+ 树 ~
Univariate function integration 1__ Indefinite integral
数字孪生轨道交通:“智慧化”监控疏通城市运行痛点
进程和线程知识点总结1
Hash table~
Introduction to FLV documents
18张图,直观理解神经网络、流形和拓扑
TextKit 自定义UILabel识别链接
ACM SIGIR 2022 | interpretation of selected papers of meituan technical team