Sunday, December 27, 2009
What are cookies and should you be using them?
A Cookie is a data file that is written on the user's computer by a program within a Web page. Cookies are often used to store information about:
- Which pages a user has viewed
- How many times a user has visited a Web site
- What information the user has entered on past visits (e.g. login name and password or customer data)
- What items a user has selected to purchase (shopping cart)
- A cookie stores information in pairs of variable names and associated values. Each name/value pair is separated by a semicolon (
;):
userid=mkellog;password=hello; - Information in cookies is essentially private. Cookies can only be read by the same Web site domain name or IP address that created them.
Labels: web programming, website tips
