Cookie and session status

xiaoxiao2021-03-06  48

Do BS development, these two concepts are essential, first come to a matter of understanding, no practical application is difficult to deepen, deeply see the reference address!

What is cookie? Cookie is a small text message, accompanied by user requests and pages pass between web servers and browsers. Each time the user has access to the site, the web application can read the information contained in the cookie. Cookie's basic working principle If the user accesses the page on the site, when the user enters URL www.contoso.com, the browser looks for the cookie associated with the URL on the local hard disk. If the cookie exists, the browser sends it with the page request to your site cookie What is the most fundamental use of cookies to help the Web site to save the information about visitors. More generally, cookie is a method of maintaining a continuity of web applications (ie, "Status Management"). Remember your web site.

What is session session? When the user accesses your site, the server creates a unique session for the user, and the session will continue to the end of user access. What is a session ID, what is it used? ASP.NET needs to track the session ID of each user, so that the user can map the user to the session status information on the server. By default, ASP.NET uses a non-permanent cookie to save the session state. What happened to disable browser cookies? However, if the user disables the cookie of the browser, the session status cannot use cookies to save the session ID, the session status will not work. There is no session state without cookies. Where is the request object of ASP.NET?

Reference address http://www.microsoft.com/china/msdn/library/rchives/library/dv_vstechart/html/vbtchaspnetcookies101.asphttp://support.microsoft.com/default.aspx?scid=kb;n-us; 307598

转载请注明原文地址:https://www.9cbs.com/read-52143.html

New Post(0)