When you need to pass some snippet of information to another system to make it do something, how do you do it? If you're on the Web or some other network, you use a cookie. The cookie is a text file saved in your browser's directory or folder and stored in RAM while your browser is running.
Most of the information in a cookie is pretty mundane stuff, but some Web sites use cookies to store personal preferences. (MSN, and Netscape all have personalisation processes that use cookies to store information). 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.
What are cookies?
A "cookie" is a small piece of information sent by a web server
to store on a web browser so it can later be read back from that browser.
This is useful for having the browser remember some specific information.
What are they used for?
An example is when a browser stores your passwords and user ID's. They are
also used to store preferences of start pages, both Microsoft and Netscape
use cookies to create personal start pages. Common uses are:
Online Ordering Systems:
An online ordering system could be developed using cookies that would remember what a person wants to buy, this way if a person spends three hours ordering CDs at your site and suddenly has to get off the net they could quit the browser and return weeks or even years later and still have those items in their shopping basket.Site Personalization:
This is one of the most beneficial uses, let's say a person comes to the MSNBC site but doesn't want to see any sports news. They allow people to select this as an option; from then on (until the cookie expires) they wouldn't see sports news. This is also useful for start pages.Website Tracking:
Here is a hot button! A lot of people think it is an invasion of privacy, if a web site designer wanted to see what interests them. Site tracking can show you "Dead End Paths", places in your website that people go to and then wander off because they don't have any more interesting links to hit. It can also give you more accurate counts of how many people have been to pages on your site. You could differentiate 50 unique people seeing your site from one person hitting the reload button 50 times.Targeted Marketing:
This is probably one of the main uses of cookies. They can be used to build up a profile of where you go what adverts you click on. This information is then used to target adverts at you, which they think are of interest. Companies also use cookies to store which adverts have been displayed so the same advert does not get displayed twice.
How Do They Work?
This is technical stuff but here is an explanation of cookies, you may find
it interesting. 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; n=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.