gpt4 book ai didi

java - 某些网站/应用程序可以为未登录的用户使用 "session variables"吗?

转载 作者:行者123 更新时间:2023-11-29 03:07:33 26 4
gpt4 key购买 nike

我想知道某些网站或网络应用程序是否可以在未登录的用户浏览网站时使用“ session 变量”(不是 cookie)来存储一些导航数据。如果答案是肯定的,这些情况是什么?

最佳答案

网站/应用程序可能使用 cookies在用户的机器上存储任意数据(即使用户没有登录)。来自链接的维基百科条目,

An HTTP cookie (also called web cookie, Internet cookie, browser cookie or simply cookie, the latter which is not to be confused with the literal definition), is a small piece of data sent from a website and stored in a user's web browser while the user is browsing that website. Every time the user loads the website, the browser sends the cookie back to the server to notify the website of the user's previous activity.1 Cookies were designed to be a reliable mechanism for websites to remember stateful information (such as items in a shopping cart) or to record the user's browsing activity (including clicking particular buttons, logging in, or recording which pages were visited by the user as far back as months or years ago).

一般来说,session id 被存储为一个cookie;但您可以存储任何您喜欢的东西(请记住它会被发送每个请求)。

关于java - 某些网站/应用程序可以为未登录的用户使用 "session variables"吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31331461/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com