Cookies are a very useful; they can store usernames/password, preferences, last visits, etc. I will focus on storing information a user may type in at a typical website. So let's get started?
Cookies are easy to create and retrieve using ASP.
They can be used to remember things about a user when they come back to your site. Cookies expire after a certain amount of time which you can set. Also, the clients browser must have cookies enabled for them to work.
Cookies enable you to write text directly to a users computer*. This can be used to easily recognize if a user has been to your site before or used to prevent multiple entries in to forms. The example below will take any input you type in and write it to a cookie. A hyperlink to the same page is created to demonstrate on subsequent visits (within 3 days) the user will see their input rather then the text input box. To see the cookie on your PC locate your cookie directory (typically located in C:WINDOWSCookies) and find the one named www.codeave.txt. *The ability to write cookies to the PC can be restricted by the user by changing security options
session: A concept to represent a series of HTTP requests and responses exchanged between a specific Web browser and a specific Web server, see the following diagram:
There are a wide variety of things you can do with cookies. They are used to store information about user, visited pages, last visits and etc. The main purpose of cookies is to identify users and possibly prepare customized Web pages for them.
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.