What are Cookies?

Over the past year, you will have noticed that many websites have started to display warning messages to inform you that they use cookies. Cookies are not a new technology but, a year ago, legislation was brought in that required websites to gain permission before using them. This post is for those of you who may still feel you don’t really know what cookies are all about.

When you access a website without cookies, each page visit, i.e. looking at the home page or the contact page, is an individual action; the website has no way of identifying a user as someone who has visited before. This is the reason that cookies are necessary. Cookies are small text files placed on your computer by websites that you visit. Each cookie has a name and a value, just like a normal text file. Once a cookie has been stored on your computer by a particular website, it is sent back with each subsequent visit to the same website.

How are Cookies Used?

There are many uses for cookies but, in general, their intention is to improve the user experience. For example, imagine a website offered the choice of small or large text, with small text being the default. If you decided to change it to large text, you would want that preference to be used throughout your entire visit, rather than having to change it every time you move to a different page. This could therefore be stored in a cookie called ‘font_size’ with the value either being ‘small’ or ‘large’. This is a very simple example but it starts to show how cookies can be useful.

Often, websites assign unique reference numbers to each user. Imagine you visit the homepage of a website that you’ve never visited before. The website generates a unique reference number which it assigns to you. This number is then stored on your computer in a cookie called ‘user_id’. Now when you access a different page on that website, e.g. the contact page, the ‘user_id’ cookie is sent back to the website so it can identify you as the person who was previously looking at the home page. This type of cookie use is very important for things such as shopping baskets and account logins, where the user needs to be identifiable as they move around the website.

An Analogy

I appreciate these concepts can be a little confusing so I’ll give you an analogy of buying goods from a supermarket. If you were to visit the supermarket and buy your shopping with cash, the supermarket would have no way of identifying you. You could go back and buy more but there would be no information that enabled the store to know you had bought from them in the past. This is how a website works without cookies; each visit is completely anonymous. In this analogy, storing a cookie can be likened to the store giving you a loyalty card on your first visit; every subsequent time you shop at the store, you produce your loyalty card, and whilst the supermarket doesn’t necessarily have any personal details, they can look at the details of your past visits.

Taking the shopping analogy a little further, we can see another use for cookies, and this is where people may start to feel that their privacy is being invaded. If you use a loyalty card every time you shop, the supermaket can start to see your buying habits. In the same way, a website can sometimes build up an idea of your interests, and this can be used to target advertising. This isn’t necessarily a bad thing; personally, I’d rather be seeing adverts that are relevant to me than those offering make-up and tampons. However, it can be considered invasive and this is what people sometimes object to.

My aim here was to give you an understanding of how cookies work. There are many further issues and consequences of cookies being used, hence the new legislation, but I will leave you to investigate further if you wish to do so.