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 > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what are the forms of cookies". The explanation in this article is simple and clear, easy to learn and understand. Please follow the ideas of Xiaobian and go deep into it slowly to study and learn "what are the forms of cookies" together!
Why cookies are needed
HTTP protocol is stateless, for a browser to send multiple requests, the server can not distinguish whether it is from the same browser, need additional data to identify, cookies are just such a piece of extra data passed with HTTP request.
Sometimes, the server needs to store information about the user, preferably on the user's computer and accessible to the server. For example, the implementation of automatic login function requires that the user name and password be saved locally. When visiting the website next time, the user name and password will be sent to the server for verification. After verification, the user will automatically log in. Otherwise, the user cannot log in.
These servers store information on the user's computer called cookies.
Cookies are stored on the user's computer. When visiting the corresponding website again, the browser will send the cookies to the server for processing.
What cookies can do
A cookie is just a piece of text, so it can only store strings. And browsers have size limits on it and it gets sent to the server with every request, so make sure it's not too big. The content of cookies is also stored in plain text, and some browsers provide interface modification, so it is not suitable for storing important or privacy-related content.
Restrictions on cookies
Most browsers support cookies up to 4096 bytes. Because this limits the size of cookies, cookies are best used to store small amounts of data or to store identifiers such as user IDs. The user ID can then be used to identify the user and read user information from a database or other data source. Browsers also limit the number of cookies a website can store on a user's computer. Most browsers only allow 20 cookies per website; if you try to store more cookies, the oldest cookies are discarded. Some browsers also place an absolute limit on the total number of cookies they will accept from all sites, usually 300.
the form of cookies
Cookies exist as key/value pairs, one value for each "variable," separated by semicolons, as follows:
username=itxueyuan;password=123456;age=22
Thank you for reading, the above is "what are the forms of cookies" content, after the study of this article, I believe that we have a deeper understanding of the form of cookies, the specific use of the situation also needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!
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.