The HTTP protocol is a stateless protocol, which means the server does not know that the HTTP connection was sent by that browser.
To identify the unique session, there are two methods: 1 Cookie 2
Session-level Cookies (switch browser counts one session) and persistent cookies (write to hard disk storage)
1 a mechanism for completing session tracking: A scenario that maintains HTTP state information on the client
2 It is a small text file that is passed to the browser by the Web server in the HTTP response information header when the browser accesses a resource on the server.
3 Once a cookie is saved, the next visit will bring a cookie
4 Related APIs:
Create a cookie and set the age of the cookie.
Set the scope of the cookie SetPath; pass the cookie to the client, Response.addcookie
Gets the name and value of the cookie.
5 The default is not to set the time for session-level cookies, which are stored in memory. If the time is set, the persistent cookie is saved on the hard disk. Two different browsers to share. (It's no longer necessary.)
6 function automatic login function.
Web Session Management