Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

深入分析 Session & Cookie | 姜咏康的博客 #118

Open
JiangYongKang opened this issue Jul 2, 2022 · 0 comments
Open

深入分析 Session & Cookie | 姜咏康的博客 #118

JiangYongKang opened this issue Jul 2, 2022 · 0 comments

Comments

@JiangYongKang
Copy link
Owner

https://blog.jiangyongkang.com/2018/09/22/%E6%B7%B1%E5%85%A5%E5%88%86%E6%9E%90-Session-Cookie/

因为Http协议是无状态的,服务端不知道用户上一次做了什么操作或者请求了什么接口。简单来说就是浏览器发送了两次请求,服务端是无法识别这两次请求是否来自同一个用户。这也是为什么会有 Session 和 Cookie 的原因,它们的作用就是用来维持客户端与服务端的会话。更简单的说,就是让服务端知道每一个请求都是来自于哪个用户。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant