In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
What is the role of Cookie, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
Both Cookie and Session are used to track the identity of browser users, but their application scenarios are not quite the same.
Cookie is generally used to save user information, such as ①. We keep the user information that we have logged in in Cookie. The next time we visit the website, the page will automatically help you log in. Fill in some basic information. ② general websites will have to keep login, that is to say, the next time you visit the site, you do not need to re-log in, this is because when the user logs in, we can store a Token in Cookie, the next time we log in, we only need to find the user according to the Token value (for security reasons, re-login is usually necessary to rewrite the Token); ③ login to the site after a visit to other pages do not need to re-login. 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.
Cookie data is saved on the client side (browser side), and Session data is saved on the server side.
Cookie is stored in the client, while Session is stored on the server, so Session is relatively more secure. If you want to store some sensitive information in Cookie, do not write it directly into Cookie, it is best to encrypt the Cookie information and then decrypt it to the server when it is used.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.