What are cookies?

A 'cookie' is a small piece of information sent by a web server to store on your computer, so it can later be read back from your hard disk.

What are they used for?

Cookies are lines of data sent to an Internet user's computer by some Web servers when the user's Web browser visits the server. These cookies remain in the user's computer and can thereafter be read and updated when the browser requests pages from the same server. Cookies are used for making it easier for users to access their favorite Web sites without having to go through a lengthy process of identifying themselves every time they visit. The most recent versions of the two main browsers, Navigator and Internet Explorer, let users chose to be warned before receiving cookies from websites, or to block them completely. If you want to see what information is stored in your cookie file, use a text editor or a word processor to open a file called cookies.txt or MagicCookie in your browser's folder or directory.

How Do They Work?

A command line in the HTML of a document tells the browser to set a cookie of a certain name or value. Here is an example of some script used to set a cookie. Set-Cookie: "NAME=VALUE; expires=DATE; path=PATH; domain=DOMAIN_NAME; secure". Cookies are usually run from CGI scripts, but they can also be set or read by Javascript. 


An HTTP Cookie cannot be used to get data from your hard drive, get your email address or steal sensitive information about your person. Early implementations of Java and JavaScript could allow people to do this but for the most part these security leaks have been plugged. But HTTP Cookie can be used to track where you travel over a particular site. This site tracking can be easily done without using cookies as well, using cookies just makes the tracking data a little more consistent. If you want to disallow cookies you can do so with version 3.0 or greater of Netscape.