COOKIE and SESSION comparison
1. the HTTP protocol itself is stateless.
We need to transmit information over HTTP to access the Internet. For example, if you type "www.sanyalanhua.com" in your browser and press enter, you will find that the
Session is a server-side storage space maintained by the application server. When you connect to the server, the server generates a unique SessionID, use this SessionID as the identifier to access the Session bucket on the server. SessionID is saved
Document. cookie allows you to perform various operations on cookies, including cookie setting and deletion. The following article describes how to use cookies in JavaScript.
1. Set cookie
Each cookie is a name/value pair. You can assign the
the difference between a cookie mechanism and a session mechanism
In particular, the cookie mechanism uses a scheme that maintains state on the client, while the session mechanism uses a scenario that maintains state on the server side.
We also
The difference between cookie mechanism and session mechanismIn particular, the cookie mechanism uses a scheme that maintains state on the client, while the session mechanism uses a scenario that maintains state on the server side.At the same time,
Source: http://hi.baidu.com/225247/blog/item/3a1fff298b998cf899250a10.html Set cookieEach cookie is a name/value pair. You can assign the following string to document. COOKIE:Document. Cookie = "userid = 828 ";To store multiple name/value pairs at
Turn from: Click to open the link
The difference between cookie mechanism and session mechanismSpecifically, the cookie mechanism is a scheme for maintaining state on the client side, and the session mechanism uses the scheme of maintaining state
Set and read cookies in servlet display
1. What is Cookie?
Cookie is a message sent to the client by the Web server using the set-Cookie response. The client returns the message to the server in subsequent requests. The server can read (but cannot
Cookie mechanism: In general, any request made by a browser within the same domain will be brought with a cookie, regardless of the resource requested, and the cookie appears in the cookie field of the request header, if requested. The Set-cookie
Cookie is a technology that maintains HTTP status information on the client. It is like a discount card issued by a mall. When a customer closes a shopping bill in a mall, the mall can decide whether to give the customer a discount card. The
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.