当前位置:网站首页>cokkie和session的区别
cokkie和session的区别
2022-06-29 08:17:00 【amateur12】
cookie有长度限制,最大4kb
cookie保存在客户端(浏览器),session保存在服务器端。
session可以存任意数据类型,一般情况下我们可以在 session中保持一些常用变量信息,比如说 UserId 等。
cookie可设置为长时间保持,比如我们经常使用的默认登录功能,session一般失效时间较短,客户端关闭或者 session超时都会失效。
session更安全:
sessionID存在cookie中,要攻破session首先要攻破cookie
sessionID要用户登录或者开启session才有,所有攻破cookie也不一定得到session
session再次开启,第一次的就过期了
并且sessionID是加密的
边栏推荐
- Does the SQL server run with administrator privileges? Or run it as a normal user?
- 华为设备配置小型网络WLAN基本业务
- Differences between x86 and x64
- 【Redis】Redis6学习框架思路和细节
- dcase_util教程
- Simple use of vlookup function in Excel -- exact matching or approximate matching data
- Application of mediastreamer2 and GStreamer in embedded field
- Matlab 用法
- The return values of hostname -f and uname -n may be different
- 名企实习一年要学会的15件事,这样你就省的走弯路了。
猜你喜欢

CDGA|交通行业做好数字化转型的核心是什么?

Oracle-子查询

Typescript variable declaration - type assertion

2022年7月系统集成项目管理工程师认证招生简章

Core development board & debugger

51 MCU interrupt and timer counter, based on Puzhong technology hc6800-esv2.0

2022春夏系列 KOREANO ESSENTIAL重塑时装生命力

2022年7月(软考高级)信息系统项目管理师认证招生简章

Mutex mutex

The final of the sixth season of 2022 perfect children's model Hefei division came to a successful conclusion
随机推荐
Some behaviors of Apple developers that are prone to investigation
(III) encoder self attention mask
Baodawei of the people's Chain: break down barriers and establish a global data governance sharing and application platform
机器人代码生成器之Robcogen使用教程
Self attention mechanism
Typescript variable declaration - type assertion
Huawei equipment is configured with medium-sized network WLAN basic services
hostname -f与uname -n的返回值可能不同
Sed replace value with variable
实战回忆录从webshell开始突破边界
网上开股票账户真的安全吗?求答案
Interprocess communication (IPC)
Standard | China payment and clearing Association releases the first privacy computing financial specification
The sixth season of 2022 perfect children's model Qingyuan competition area audition came to a successful conclusion
Dialogue | prospects and challenges of privacy computing in the digital age
Swift中@dynamicMemberLookup和callAsFunction特性实现对象透明代理功能
微信小程序开发,如何添加多个空格
The final of the sixth season of 2022 perfect children's model Hefei division came to a successful conclusion
今年的网络安全“体检”你做了吗?
晋升或汇报,你真的把事情讲清楚了吗?