What is a Cookie?
A Cookie on the Internet is a single piece of data created by a program running on a webpage server and sent for temporary or permanant storage on a requestor’s PC for the benefit of that program or facility. The process of creating the data is known as “setting” the cookie. The data can be anything useful to the creating program, such as current shopping cart contents, current login information, user color theme preferences.
After the program on the server exits, the cookie may remain stored on the requestor’s PC for the next time the program runs. When that happens, the program may ask to see the cookie so that it can take up where it left off in the flow of things. So, the browser sends it back. For example, the user may be building a shopping cart full of purchases as he travels around a website. The cookie actually becomes a local pointer to the user’s online shopping cart.
This process of a server program asking to see the contents of a previously set cookie is known as “getting” the cookie. If the data stream between server and browser is encrypted, the exchange of cookies back and forth is safe from the prying devices of hackers and crooks. This allows keys to online credit card data and financial information to be safely stored in cookies during online purchases.
Cookies solve a big problem in the design of the Internet: it is essentially designed to be “stateless”. That is, programs are meant to run and exit without leaving anything around for the next programs that follow so that they can see what their predecessors were up to. In short, cookies are datagrams or private save areas that allow state maintenance during Internet program flow.
What Cookies are NOT
- They are not programs. They contain no executable code and cannot be “run”.
- They are not mechanisms for romping around on your machine prying into your personal digital life.
- They are not viruses, trojans or worms, nor do they facilitate such.
- They are not available by strict international standards to other programs running on other websites, even on the same local user’s machine.
- They are not plugins. They do not enhance any feature of the browser or, for that matter, the operating system.
- They do not read your hard drive and stealthily send your life story to an evil master collector.
- They have no life of their own: they do not act maliciously. In fact, they do not act.
The Bottom Line
Cookies are merely convenient and, in many cases, essential text files that can be deleted at any time, either manually by you or automatically by your browser. They come in three basic types:
- Temporary: those that go away when you quit your browser (the browser deletes the cookie) or do something such as logout of a program (the program deletes the cookie).
- Expiring: those that expire after a prescribed time (shopping cart data, for example).
- Persistent: those that are designed never to expire (news service subscription registration data, user program preferences, etc.).
For an excellent and thorough treatise on Internet cookies, you may view the Wikipedia entry on the subject.