Saturday, June 6, 2009

What is a Cookie?

So, what exactly do we mean by a Cookie?
(First things first, by cookie we do not mean a biscuit.)
Cookies are a very very important method for maintaining state on the Web.
"State" in this case refers to an application's ability to work interactively with a user, remembering all data since the application started, and differentiating between users and their individual data sets.
(An analogy I’d like to use is my laundry man's shop. You drop something off, and get a ticket. When you return with the ticket, you get your clothes back. If you don't have the ticket, then the laundry man doesn't know which clothes are yours. In fact, he won't be able to tell whether you are there to pick up clothes, or a brand new customer. As such, the ticket is critical to maintaining state between you and the laundry man.)
When we connect to the internet for browsing we make use of HTTP, Unfortunately, HTTP is a "stateless" protocol. This means that each visit to a site (or even clicks within a site) is seen by the server as the first visit by the user. In essence, the server "forgets" everything after each request, unless it can somehow mark a visitor (that is, hand him a "laundry ticket") to help it remember.
Cookies are used to accomplish this.

Again, what is a Cookie?
A Cookie is a small bit of textual information sent by the web server to the web browser, which is again returned by the web browser unchanged, to the web server when the web browser returns to the same web page/site.
Cookies can’t create any serious security threats to the system because cookies are neither interpreted nor executed. A cookie is a text-only string that gets entered into the memory of your browser.
Why do sites use Cookies or the Benefits of Cookies? There are many reasons a given site would wish to use cookies.
· These range from the ability to personalize information (like on My Yahoo or Excite), or to help with on-line sales/services (like on Amazon Books or eBay), or simply for the purposes of collecting demographic information (like DoubleClick).
· Remembering Username and Password: many websites require user to register with them & during registration you need to specify username and password (apart from other information, of course)
· Identifying a user during an e-commerce session: Online stores make use of ‘Shopping Cart’ metaphor to allow the customers to purchase from the online store. While adding a new item to the ‘Shopping Cart’, the server identifies the customer who added the last item, using cookies.
· Cookies also provide programmers with a quick and convenient means of keeping site content fresh and relevant to the user's interests. The newest servers use cookies to help with back-end interaction as well, which can improve the utility of a site by being able to securely store any personal data that the user has shared with a site (to help with quick logins on your favorite sites, for example).
What are the problems with Cookies?
The sad truth is that revealing any kind of personal information opens the door for that information to be spread. Consider the growing trend of technology conveniences in our lives. We use "frequent buyer" cards at supermarkets and gas stations. We place electronic tags on our cars to pay tolls faster and easier. We let banks pay our bills for us automatically each month without checks. We also use a search engine to search for different stuff. While each of these technologies (and others like them) has made our lives more convenient, each time we use them exposes us to a loss of privacy. Stores know what foods you eat. Gas stations know how much you spend on gas per fill-up. Turnpike operators know how fast you drive on their highways. Banks know how you spend your money each month. The search engine remembers your last search and puts a banner advertisement associated to your search.It's the same with cookies. In fact, one may argue that cookies in the long-run will be less damaging to privacy efforts than those technologies described above. If you're going to single-out cookies as your sole vulnerability to personal privacy, you should re-examine how you live your daily life. The never-ending ethical debate associated with these facts shall be left to other forums. However, it is wise to consider carefully the information you collect and share over the Internet.

No comments:

Post a Comment