2475Lesson 1 : Using Cookieshttp://www.findsp.com/Tutorials/New/Tutorial/ViewTutorial.asp?article_id=21Cookies are small text files that are placed on the visitor`s machine. You`ve probably been to sites where you were asked to register. One reason why you might be asked to register is so that the site administrator can keep track of how many times you`ve been to their site. Or, with another scenario, you`re going into a chat room and you are asked to enter a nick name. It`s very likely that both are using cookies to store this information.ASP > Tips and Tutorials > Cookies and SessionsOct 10, 2006
Cookie: A small amount of information sent by a Web server to a Web browser, saved by the browser, and sent back to the server later. Cookies are transmitted inside the HTTP header.
Cookies are small text files that are placed on the visitor`s machine. You`ve probably been to sites where you were asked to register. One reason why you might be asked to register is so that the site administrator can keep track of how many times you`ve been to their site. Or, with another scenario, you`re going into a chat room and you are asked to enter a nick name. It`s very likely that both are using cookies to store this information.
Detecting whether or not a visitor to your web site can accept cookies is not difficult. There are, however, a number of issues involved in the process which can cause it to get confusing. This article will explain the problems faced and address them one by one. This will result in a cookie detection script written in ASP that you can use on your own site.
Why use cookies?
Amongst other things Cookies are used to store information about a user, to store usernames and passwords, visited pages, favourites, last visits etc. They allow us to personalize web pages.
The first time a user accesses to a our pages some connections and disconnections took place. During this process the server and the client will interchange information to identify each other. Due to this exchange of information our server will be able to identify a specific user and this information may be use to assign specific information to each specific client. This relationship between computers is call a session. During the time a session is active, it is possible to assign information to a specific client by using Session method. We will use an example to explain this method:
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.