当前位置:网站首页>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 
边栏推荐
- ActiveMQ基本详解
- 如何执行建设项目的时间影响分析?
- 【Jenkins笔记】入门,自由空间;持续集成企业微信;allure报告,持续集成电子邮件通知;构建定时任务
- “index [hotel/jXLK5MTYTU-jO9WzJNob4w] already exists“
- Digital twin rail transit: "intelligent" monitoring to clear the pain points of urban operation
- Dart array, map, type judgment, conditional judgment operator, type conversion
- ACM SIGIR 2022 | 美团技术团队精选论文解读
- Seven SQL performance optimizations that spark 3.0 must know
- Necessary interview skills for Android (including interview questions and learning materials)
- ACM SIGIR 2022 | interpretation of selected papers of meituan technical team
猜你喜欢

【Leetcode-滑动窗口问题】

Univariate function integration 1__ Indefinite integral

新一代超安全蜂窝电池,思皓爱跑上市,13.99万起售

Visual full link log tracking
![[untitled]](/img/28/db3b2e1985dc9acf41cdf2004ea0d5.png)
[untitled]
![“index [hotel/jXLK5MTYTU-jO9WzJNob4w] already exists“](/img/f2/37a1e65eb1104d72128f96fc5d9c85.png)
“index [hotel/jXLK5MTYTU-jO9WzJNob4w] already exists“

Day2: 130 questions in three languages
![[raspberry pie] how does the windows computer connect with raspberry pie](/img/d6/42685bbc4e4af757867442b63ce9c8.png)
[raspberry pie] how does the windows computer connect with raspberry pie

Linux Redis 源码安装

【unity】将unity编辑c#配置为vscode
随机推荐
Charles -- 从0-1教你如何使用抓包工具
Digital twin rail transit: "intelligent" monitoring to clear the pain points of urban operation
How to deal with the time, scope and cost constraints in the project?
进程和线程知识点总结 2
B+ 树 ~
电子招标初学者指南
B-tree~
机器学习 | MATLAB实现RBF径向基神经网络newrbe参数设定
[raspberry pie] how does the windows computer connect with raspberry pie
Wechat campus bathroom reservation of small program completion work (6) opening defense ppt
LeTax记录\documentclass{},authoryear属性使用
进程和线程知识点总结1
Thread lock and its ascending and descending levels
一元函数积分学之1__不定积分
Consumer unit 消费单元
消费行业数字化升级成“刚需”,weiit新零售SaaS为企业赋能!
dart数组,Map,类型判断,条件判断运算符,类型转换
18 diagrams, intuitive understanding of neural networks, manifolds and topologies
Transfer: cognitive subculture
Textkit custom uilabel identification link