SLASH themag articles

@
the articles
[C is for Cookie, That's how they know it's me!]

August 24, 1999 by Magic Kapoola
&
ARTICLE QUOTES


"The cookies themselves are useless text. They gain their value by the context in which they are used."

Did you ever look through all settings available to you on Netscape Navigator or Microsoft Internet Explorer? One of the settings you came across is probably to disable or issue a warning before accepting a cookie. But the real question is: "What exactly is a cookie?"

WHAT IS A COOKIE?

A cookie is a small bit of information about you that is stored on your computer to help identify you. When you visit a website and give them information such as an email address, that information may be stored on a cookie on your computer so that you don't need to re-enter the information every time you visit the site.

HOW DOES A COOKIE GET ONTO MY COMPUTER?

When visiting a website that wants to use cookies, the site creates little sets of information and then sends a request to your browser to store the cookie. If the browser accepts, the information is written to a text file on your hard drive. If your browser rejects it then a well written site will use another method to store the information such as encoding it in the URL, or it might just return an error that says you need to enable cookies in order to use a feature on the site.

ARE COOKIES DANGEROUS?

This one isn't a simple question. One thing to remember is that you don't need to give information to a site. The information stored in cookies is either given by you or inferred from choices you make. If you submit your email then it may be stored in a cookie. In addition, visiting the cow site at foobar.com may result in the placement of a cookie letting them know that you have an interest in cows.

A primary safety feature for cookies is that the only way a site can get a cookie from your computer is if it is identified as the site that put it there. Even within a site the receipt of cookies isn't guaranteed. Let's say you visit a site with the URL 'http://www.foobar.com'. If a cookie is placed on your computer from a page under that, such as http://www.foobar.com/cows/cow.asp, the cookie may be receivable by any page under http://www.foobar.com or it may only be receivable by http://www.foobar.com/cow or files below that such as http://www.foobar.com/cow/udders/howmany.asp. The other fear about cookies is whether there will be some mysterious virus in them that wipes out your hard drive or does something else harmful. The answer is that it can't happen. A text file is one such that you can read it and write to it, but it can't actually run or do anything.

SO IF THEY CAN'T DO ANYTHING HOW CAN THEY BE USEFUL?

The cookies themselves are useless text. They gain their value by the context in which they are used. For example: I give you a text file that says 'cows'. Not very useful is it? However, to a site that sells animal supplies they will know that the last item you were looking at was in the cows section. Thus, you can be taken directly to the part of the site that concerns cow supplies, where you can buy the cow bell of your dreams to make ol' Betsy a ringer.

HOW DO THEY GET BACK TO THE SITE IF THEY ARE ON MY HARD DRIVE?

When you visit a site your browser checks to see if there are any cookies belonging to that site on your computer. If there are some the browser sends them to the site. From there the website may ignore them, or choose to use them to customize the site to your needs or preferences; helping you to make ol' Betsy a happy cow.

(Disclaimer: SLASH cannot guarantee the validity of this information in a constantly changing medium. This article should be used for educational purposes only. SLASH will not he held responsible for damages incurred due to use of this information.)


Magic Kapoola is a programmer using BASIC, C/C++, COBOL,
Java, LISP and various other languages.  He has been
developing CGI programs for 3 years in C and C++.
His other areas of research include Artificial Intelligence and 
distributed systems. Paul says, "You never know when you'll
need legal advice!" and suggests learning about PrePaidLegal.

He can be reached by email at 
Magic_Kapoola@hotmail.com.

RELATED LINKS

(none)

Back to The Site Index
Copyright (C) davesite.com. All Rights Reserved.