Introduction to JSP State Management

A statelessness of the http protocol
Statelessness means that when the browser sends a request to the server, the server responds to the client request.
But when the same browser sends the request to the server again, the server doesn't know that it is the browser just now.
Simply put, the server won't remember you, so it's a stateless protocol.
 
Two major mechanisms for saving user state
Session
Cookie
 
Three Cookie Overview
Cookie: The Chinese name is "小Cookie", which is a series of text information stored on the client by the Web server.
Typical application 1: Determine whether the registered user has logged in to the website.
Typical application two: "shopping cart" processing.
 
Four applications of cookies in life


 
 
Five Roles of Cookies
1. Tracking of specific objects
2. Save user web browsing records and habits
3. Simplified login
 
Six cookies present security risks

 

It is easy to leak user information.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326723431&siteId=291194637