httpssession和cookie的问题

发布于 2024-10-03 18:37:15 字数 456 浏览 0 评论 0原文

1)session和cookie有什么区别。

我知道cookie存储在客户端,而session存储在服务器端。

但我想知道他们之间的关系是什么?

有人告诉我,有两种方法来实现会话:cookie 和 url-rewrite。所以我很困惑......

我已经阅读了这个问题的答案: 什么是-a-之间的差异session-and-a-cookie

2)session的生命周期怎么样。

它是什么时候创建的?每个http请求都会创建一个新的会话(假设request.setSession(true))?会议什么时候结束?我知道当浏览器关闭时会话将会超时。但是会话超时的确切含义是什么?

1)what is the difference of session and cookie.

I know the cookie is stored at client-side,and the session in server-side.

But I wonder what is the realation ship of them?

Someone tell me that there are two ways to implement the session:the cookie and the url-rewrite. so I am confused....

I have read the answer in this question:
what-is-the-difference-between-a-session-and-a-cookie

2)how about the life cycle of session.

When is it created? Does each http request will create a new session(suppose the request.setSession(true))? When does the session closed? I know the session will be timeout when the browser is closed. But what is the exactly meaning of the session timeout?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文