Cookies and Sessonid

Source: Internet
Author: User

The HTTP protocol is stateless, that is, the server can only respond to HTTP requests that you submit at this time. Cookies can be used to tag clients on the server side. such as after the login password-free, shopping cart implementation.


Cookies can be generated by JS code, or by server-side code.

A cookie consists of a property such as name, value, domain, and a column that can be viewed.

A cookie is included, and the next time it is accessed, it contains a cookie in the HTTP request and can have many cookies.

Sessinid nature is still a cookie. SessionID an object on the server that can store a variety of information, usually in memory. When the client requests the session object for the first time, the server creates a session for the client, and the ID of the session is calculated by a special algorithm, which is used to identify the session object, and when the next time the session continues to be valid, the browser requests other resources. The browser automatically places the SessionID in the request header, the server receives the request SessionID, and the server finds the session of the ID to be returned to the requestor (Servlet) for use.

Microsoft's SessionID
SessionID of JSP


The cookie data is stored on the client's browser and the session data is placed on the server.

Cookies and Sessonid

Contact Us

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: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.