Session Management -1.1.cookie Introduction

Source: Internet
Author: User

What is 1.Cookie?

Cookies mean "Cookie", which is presented by the world-group, and the cookie has become the standard, and all major browsers such as IE, Netscape, Firefox, opera and so on support cookies.

Because HTTP is a stateless protocol, the server does not know the identity of the client from the network connection. What do we do? Give the client a pass, one per person, who must bring their own pass for whoever accesses it. This allows the server to confirm the identity of the client from the pass. That's how cookies work.

A cookie is actually a small piece of text information. The client requests the server and, if the server needs to log the user state, uses response to issue a cookie to the client browser. The client browser will save the cookie. When the browser requests the site again, the browser submits the requested URL along with the cookie to the server. The server checks the cookie to identify the user state.

2. How do I view cookies?

It's easy to see the cookies issued by a website. Enter Javascript:alert (document. cookie) in the browser's address bar. The JavaScript script pops up a dialog box showing the contents of all cookies issued on this site.

Different browsers use different ways to save cookies.

IE will be saved as a text file under "C:\Documents and Settings\ your user name \cookies" folder, and a text file holds a cookie.

3. Note

The cookie feature requires browser support, If the browser does not support cookies (such as the browsers in most phones) or if the cookie is disabled, the cookie function will expire.



From for notes (Wiz)



Session Management -1.1.cookie Introduction

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: info-contact@alibabacloud.com 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.