当前位置:网站首页>cookie session 和 token
cookie session 和 token
2022-06-26 08:38:00 【你还差的远呢。】
cookie 的缺点
默认跨域
安全性差容易 csrf攻击
存储内存小
不适用于移动端 跨域不共享cookie
token缺点
比cookie更占内存和带宽
秘钥泄漏,用户所有信息丢失
存在客户端,无法在服务端注销
token 优点
无状态
支持跨域
防止csrf攻击
支持移动端
不占服务端内存
session优点
简单易学
用户信息存在服务端,可以快速封禁某个用户
缺点
占服务器内存,成本高
默认有跨域
多进程多服务器不好同步, 使用redis
边栏推荐
- 读书笔记:SQL 查询中的SQL*Plus 替换变量(DEFINE变量)和参数
- Two ways to realize time format printing
- Pytorch build progression
- 1.26 pytorch learning
- Sqoop merge usage
- Polka lines code recurrence
- 【300+精选大厂面试题持续分享】大数据运维尖刀面试题专栏(一)
- Drawing with MATLAB (2) -- color ring
- 20220213 Cointegration
- Principle of playing card image segmentation
猜你喜欢

Reverse crawling verification code identification login (OCR character recognition)

Fourier transform of image

【云原生 | Kubernetes篇】深入万物基础-容器(五)

Digital image processing learning (II): Gaussian low pass filter

QT_ AI

Detailed process of generating URDF file from SW model

Drawing with MATLAB (2) -- color ring

直播回顾 | smardaten李鸿飞解读中国低/无代码行业研究报告:风向变了

Exploration of webots and ROS joint simulation (I): software installation

爬虫 对 Get/Post 请求时遇到编码问题的解决方案
随机推荐
HDU - 6225 Little Boxes(__int128的使用)
nn. Modulelist and nn Sequential
Efficiency thesis Reading 1
phpcms v9后台增加阅读量字段,可任意修改阅读量
Segmentation of structured light images using segmentation network
基于SSM的毕业论文管理系统
Implementation code of interceptor and filter
2021 software university ranking crawler program
QT_ AI
MPC learning notes (I): push MPC formula manually
修复小程序富文本组件不支持video视频封面、autoplay、controls等属性问题
Pytorch build progression
20220623 Adobe Illustrator入门
编程训练7-日期转换问题
什么是乐观锁,什么是悲观锁
Steps for ROS to introduce opencv (for cmakelist)
Formula understanding in quadruped control
Exploration of webots and ROS joint simulation (II): model import
直播回顾 | smardaten李鸿飞解读中国低/无代码行业研究报告:风向变了
20220623 getting started with Adobe Illustrator