|
Session is a server-side storage space maintained by the application server. When users connect to the server, the server will generate a unique SessionID, and use the SessionID as an identifier to access the server-side session storage space. The SessionID data is saved to the client and saved with cookies. When a user submits a page, the SessionID is submitted to the server to access the Session data. This process requires no developer intervention. So once the client disables cookies, the session will also fail.
The server can also pass the value of SessionID through URL rewriting, so it does not rely entirely on cookies. If client-side cookies are disabled, the server can automatically save the session value by rewriting the URL, and this process is transparent to the programmer.
You can try it, even if you do n’t write cookies, you are using request.getCookies (); the length of the cookie array is 1, and the name of this cookie is JSESSIONID, and there is a long binary string, which is the value of SessionID.
Cookies are the storage space of the client and are maintained by the browser.
Go from http://www.ideagrace.com/club/read.php?tid=597 |
|