Sunday, October 25, 2015

What are Cookies?

We’ve been talking of ad tracking and ad blocking for a few months now. During this time, I’m sure I’ve mentioned cookies and browsers and caches and all manner of Internet jargon.
Over the next few weeks, I’m going to talk of each one of these to hopefully clarify all the bits and pieces that bring the Internet to you, what each one of them does and perhaps raise the curtain on some of this seemingly arcane technology.
Let’s start with cookies. (Just to clarify that each time I mention cookies, I’m referring to digital files and not sweet, baked, edible treats, with or without chocolate chips.)
At their simplest, cookies are simple text files that contain two pieces of information: a website name and a unique identifier of some sort. This identifier could be a number; it could be an alphanumeric string.
When you visit a cookie-using website for the first time, it places a cookie in your web browser. When you visit this website again, it looks for the cookie so that it can tell whether you have visited before and how to best tailor your experience for your latest visit. For example, the first time you visit a website, it might show you a message that welcomes you to the site and shows you how to find your way around via some simple instructions. Now, suppose you go back a couple of weeks later, the website knows you have been there before (via the cookie in your browser) so it shows you a ‘welcome back’ message instead.
This cookie helps a website to do a number of things to improve your experience each time you visit. The site gathers information on each of your visits and uses this information to learn what your browsing preferences or your areas of interest are. For instance, a news site could reorder itself to show you business and regional news higher up the page because it knows that these are the pages you tend to browse first. Or, a shopping site could show you products from the last category you were browsing on your previous visit. The cookie tells the site that you were looking for jeans on your last visit, but you left without buying any. On your next visit, the website uses this information to infer that you might still be looking for a pair of jeans, so it is trying to be helpful by saving you time and showing you what you were last looking for.
In essence, and at their simplest, cookies are an easy way for websites to recognise who has visited in the past and use this information to help provide a better experience for the visitor on each subsequent visit.
There are also more sophisticated cookies that do more than just keep track of whether you’ve visited the website before and store more than just a site name and unique identifier. We’ll delve into what these cookies do the next time.
(the hindu)