Website cookies are little files of information that a webpage tells your computer to store, and then access later. They’re named after fortune cookies, an object with an embedded message. They tend to be the same size: 4,096 bytes. Not so big, but when each website could be saving 50 or more of them, they can be used to store a lot about you.


There are three types of web cookies: session cookies, persistent cookies, and third-party cookies. When you click into ‘manage cookie preferences’, the first two types may be listed under ‘necessary’ or ‘preferences’, while third-party cookies may be listed under ‘tailored advertising’, ‘marketing’ or ‘analytics’.

Session cookies only last while you have that webpage open. They are often helpful – they enable an online shop to remember you placed items in the cart so that when you check out you still see them there. If you were to block these cookies, then many websites – including social media, online shopping and banking – would not work.

Persistent cookies, also known as first-party, permanent or stored cookies, don’t go away so easily. These cookies remember your preferences, such as login information, language selections and bookmarks. They make your browsing experience more efficient and easier. It is possible to block first-party cookies, but some websites may not function properly if you do this – you might not be able to log in and online shopping may malfunction.

Third-party cookies, also known as trackers, are more insidious. They are used to track your online behaviour: what you click on, what you buy, what you like and dislike. The data from these cookies are secretly sold by the websites to marketing companies, who then use it to profile you for personalised advertising or marketing campaigns.

You can deselect all such cookies, or even block all third-party cookies in your browser (browsers such as Safari, Firefox and Chrome disable trackers already). If you disable these cookies, you will no longer see personalised adverts and your data will be a little bit safer, and webpages will work just fine.

More like this

Read more:

Asked by: Steven Church, via email


To submit your questions email us at (don't forget to include your name and location)


Dr Peter Bentley is a computer scientist and author who is based at University College London. He is the author of books including 10 Short Lessons in Artificial Intelligence and Robotics and Digital Biology: How nature is transforming our technology and our lives.