What are the different types of cookies in ASP.NET?

Asked 07-Dec-2019
Viewed 1231 times

1 Answer


0

Cookies are messages that that a web server passes to our web browser when we visit the various internet sites. The web browser stores them in a text file called cookie.txt. When another web page is requested from the server, the browser send back the cookie to the server. These cookies basically contain information about our visit to the site. Many of the internet sites asks for permissions to use them.

What are the different types of cookies in ASP.NET?

Basically, there are two types of cookies:

  • Persistent cookies: These cookies are stored in the computer hard disk and can be accessed by the servers until they have been deleted or have expired. They are generally stored in the temporary Internet Files Folder.
  • Non-persistent cookies: Non-persistent cookies or session cookies as the name suggests are non persistent and hence are not saved in the hard disk. These are saved only up-to the time the web browser is open and can be accessed by the web server only up-to that time.