In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to save user state under the protocol that HTTP does not save state. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
HTTP is a stateless (stateless) protocol that does not save state. In other words, the HTTP protocol itself does not save the state of communication between the request and the response. So what if we save the user status? The existence of Session mechanism is to solve this problem, and the main function of Session is to record the status of users through the server. A typical scenario is a shopping cart. When you add items to the shopping cart, the system does not know which user is operating, because the HTTP protocol is stateless. After the server creates a specific Session for a specific user, it can identify the user and track the user (normally, the server will save the Session for a certain period of time, and then destroy the Session after the time limit).
There are many ways to save Session on the server side, the most commonly used are memory and database (for example, using the in-memory database redis). Since the Session is stored on the server side, how do we implement Session tracking? In most cases, we track it by attaching a Session ID to the Cookie.
What if Cookie is disabled?
The most common is to use URL rewriting to append Session ID directly to the URL path.
On the HTTP is not to save the state of the agreement on how to save the user state to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.