NOTE!

We use cookies to improve our website and your experience when using it. Cookies used for the essential operation of the site have already been set. To find out more about cookies and how to delete them Learn more

I understand

What Are Cookies?

Cookies are pieces of data, normally stored in text files, that websites place on visitors' computers to store a range of information, usually specific to that visitor - or rather the device they are using to view the site - like the browser or mobile phone.

They were created to overcome a limitation in web technology. Web pages are 'stateless' - which means that they have no memory, and cannot easily pass information between each other. So cookies provide a kind of memory for web pages.

Cookies allow you to login on one page, then move around to other pages and stay logged in. They allow you to set preferences for the display of a page, and for these to be remembered the next time you return to it.

Cookies can also be used to watch the pages you visit between sites, which allows advertisers to build up a picture of your interests. Then when you land on a site that shows one of their adverts - they can tailor it to those interests. This is known as 'behavioural advertising'.

Almost all websites use cookies in some way or another, and every page you visit in those sites writes cookies to your computer and receives them back from it.

Cookies are incredibly useful – they allow modern websites to work the way people have come to expect – with every increasing levels of personalisation and rich interactive functionality.

However, they can also be used to manipulate your web experience in ways you might not expect, or like. It could be to your benefit, or the benefit of someone else – even a business or organisation that you have never had any direct contact with, or perhaps heard of.

It is impossible to tell just by looking at them, whether particular cookies are benefitting you or another party. You have to rely on the website you are visiting to tell you how it uses cookies.

Types of Cookies

There are many different types and uses of cookies, but most can be classified in a number of different ways.

First Party Cookies

One of the key attributes of a cookie is its 'Host' - this is the domain name of the site that ultimately sets the cookie. Only the host domain can retrieve and read the contents of the cookie once it has been set.

If the host name is the same as the domain in the browser address bar when it is set or retrieved, then it is a First Party Cookie.

First party cookies are only set or retrieved by the website while you are visiting it, so they cannot normally be used to track activity or pass data from one site to another.

However the owner of that website can still collect data through their cookies and use that to change how the website appears to the user, or the information it displays.

Of course they can also collect the data and use it outside their website, and even sell it on to other organisations. However, if they do this it must be explained in the site's privacy policy.

Most desktop browsers allow you to see a list of the cookies that have been set – and they will normally be listed by the host domain value.

Third Party Cookies

If the host domain for a cookie is different to the one in the browser bar when it was downloaded, then it is a third party cookie.

They are usually placed in a website via scripts or tags added into the web page. Sometimes these scripts will also bring additional functionality to the site, such as enabling content to be shared via social networks.

For example, if you visit a site that has a YouTube video in one of its pages. This has been included by the website owner, using a piece of code provided by YouTube. YouTube will then be able to set cookies through this code, and know that you have watched that video, or even just visited the page the video is in.

Online advertising is the most common use of third party cookies. By adding their tags to a page, which may or may not display adverts, advertisers can track a user (or their device) across many of the websites they visit.

This allows them to build up a 'behavioural profile' of the user, which can then be used to target them with online ads based around their 'calculated' interests.

Use of cookies for this purpose is often seen as intrusive and an invasion of privacy. Such activity is one of the drivers behind the development of new privacy laws, especially the EU Cookie Law.

Session Cookies

Session Cookies are only stored temporarily in the browser's memory, and are destroyed when it is closed down, although they will survive navigating away from the website they came from.

If you have to login to a website every time you open your browser and visit it - then it is using a session cookie to store your login credentials.

Many websites use session cookies for essential site functions, and to make sure pages are sent to the browser as quickly and efficiently as possible.

Persistent Cookies

As the name suggests, this type of cookie is saved on your computer so that when you close it down and start it up again, it can still be there.

Persistent cookies are created by giving them an expiry date. If that expiry date is reached, it will be destroyed by the computer. If the expiry date is not set then it is automatically a session cookie.

The expiry date will normally be saved as the time the cookie was first created plus a number of seconds, determined by the programmer who wrote the code for the cookie. However, there is no real limit on the expiry date - so it could be set to be 20 years in the future. In addition, if you revisit the website that served up the cookie, it may automatically place an updated version on your computer - with a revised future expiry date.

If you login into a website, then shut down your computer, start it up again, and go back to the website to find you are still logged in - then it is using a persistent cookie to remember you.

Persistent cookies are also used to track visitor behaviour as you move around a site, and this data is used to try and understand what people do and don't like about a site so it can be improved. This practice is known as Web Analytics. Since Google started providing its own analytics technology free of charge to website owners, almost all websites use some form of it - although there are also paid-for services available to rival Google's.

Analytics cookies are probably the most common form of persistent cookies in use today.

However, persistent cookies can also, oddly, have a shorter life span than some session cookies, as they can be coded to be destroyed within a second or two of being set, whereas a session cookie will always last until you close down your browser.

Secure Cookies

Secure cookies are only transmitted via HTTPS - which you will typically find in the checkout pages of online shopping sites.

This ensures that any data in the cookie will be encrypted as it passes between the website and the browser. As you might imagine – cookies that are used by e-commerce sites to remember credit card details, or manage the transaction process in some way, would normally be secure, but any other cookie might also be made secure.

HTTPOnly Cookies

When a cookie has an HTTPOnly attribute set, the browser will prevent any client script in the page (like JavaScript) from accessing the contents of the cookie.

This protects it from so-called cross-site-scripting (XSS) attacks, where a malicious script tries to send the content of a cookie to a third party website.

How to Manage Cookies

Almost all modern browsers provide ways for you to control how your computer handles cookies. This includes the ability to block all or different types of cookies – and preventing them from being placed on your machine in the first place. They also enable you to delete the cookies that you already have. However each browser is different – and some offer more fine-grained control than others, or at least control that is easier to find. Anyone wishing to take better control over their online privacy would be well advised to spend some time familiarising themselves with the controls in their browser. However, below we provide a bit of an overview for the most common browsers.

Browsers are of course found on smartphone and tablets as well as traditional computers. Generally speaking smartphone browsers do not provide anywhere near the level of functionality in respect of cookie controls that ones on your PC or laptop do. However this is changing quickly so it is worthwhile trying to find out what controls you can make use of.

Google Chrome

Google Chrome provides quite a good level of control over cookies. These can be found under the ‘Settings’ menu, which you can get to by clicking on the spanner icon in the top right hand corner.

Under ‘Advanced Settings’ you can find a section dedicated to Privacy, which includes being able to clear your browsing history – which has several settings options, including deleting all your cookies.

You can also use Chrome to send a ‘Do Not track’ signal to the websites you visit.

However, the ‘Content Settings’ button also gives access to further controls including the ability to list all cookies and delete them individually. This list also includes HTML5 local storage and databases that modern sites sometimes use instead of cookies.

FireFox

With Firefox you get to the cookie settings by clicking in the menu box in the top left hand corner and selecting ‘Options’. On the pop-up, then select the ‘Privacy’ icon.

With Firefox you can tick a box that tells every website you visit that you do not want to be tracked. This functionality is known as Do Not Track (DNT), however there is no guarantee at the moment that a website will respect that request – and there are no legal requirements for them to do that.

You can also set your preferences for what Firefox will record of your browsing history, including the way it treats cookies. For example, you can choose to accept third party cookies, but have them deleted when you close the browser. Like with Chrome you can also see a list of all the cookies saved and either delete them all or delete just the ones you don’t like.

More recently, the Mozilla foundation have announced that newer releases of Firefox, most likely from June 2013 onwards, will block third party cookies by default.

Internet Explorer

In most recent versions of Internet Explorer you select the cog icon in the top right corner, choose ‘Internet Options’ from the drop down menu, then select the ‘Privacy’ tab in the pop-up that appears.

IE uses a slider control which you can use to select different levels of privacy, although you can also select the ‘Advanced’ button for a more custom setting for allowing or blocking first and third party cookies.

It also enables you to create lists of sites where you always want to allow or block cookies. However it does not give you the ability to list the cookies you have, or selectively delete them, through this menu.

To do that – you have to use the ‘Developer Tools’, which you can get to either from the cog icon, or by hitting the F12 button on your keyboard. Then select the ‘cache’ menu and view or clear cookies options in the drop down. The problem with this is that have to be on the site in question to do this, and it is not particularly user friendly – most people would be put off by the idea of using the developer tools, because they are not developers!

Under the Internet Options>General tab you also have a tick box that you can set to delete your browsing history when you shut it down. Ticking this will mean all your cookies are deleted when you close your browser.

From Internet Explorer 10 onwards, Microsoft introduced Do Not Track functionality. This will usually have been switched on by default when the browser was first installed. To check your own settings, go to Internet Options>Advanced. Scroll down to the Security Settings, and there you will find a tick box labelled ‘Always send Do Not Track header’. If you tick or un-tick this box, you will need to re-start the browser for the change to take effect.