When you use the internet, you leave something behind: small pieces of information about the sites you've visited, search terms and your computer's internet address. These tidbits of information are called cookies, and while they may sound delicious they can actually be quite dangerous, as the information stored in cookies in your browser can track your movements across the web.

This trail, made up of crumbs of information about you, is collected into data banks that can be mined for information about your internet habits. It's often then used by advertisers to create user profiles and target ads towards you and your specific areas of interest.

If you're more interested in protecting your privacy online than in saving a few seconds to reset preferences when you visit a website frequently, you might want to follow the steps below to delete or change your browser settings.

What is a cookie?

Browser cookies are little bit of information stored on your computer. They can be used to identify your computer and record the websites that you visit, collecting data on who you are, what you like, and what you might be interested in.

Almost every site uses cookies and they do have some benefits, like letting you save your preferences and customisation when you log in to a website, so that you don't have to reset them every time you go back to the site – things like a browser remembering your password, for example.

A cookie is a piece of code passed between your browser and a website's server, when your browser connects to a website using the hypertext transfer protocol (HTTP) process. The cookie is stored on your computer the first time you visit the site, and it passes the identity of your computer from your browser to the website's server every time you revisit that site.

The good, the bad and the really nasty

Not all cookies are created equal. In itself, a cookie is just an application, but how they're set to work can determine if they have a positive purpose, or are being used to undermine the privacy and online security of the user.

  • Short-term cookies or session cookies last for as long as someone is logged in to a site. These are the kind of cookies that are used for banking transactions, and can store details for making payments, items in an online shopping basket and viewing balances. When a user logs out of the site, the session is finished and the information is no longer held by the website.
  • Long-term or persistent cookies last longer than a single browsing session. They have many uses and can make returning to websites a better experience because they retain a user's settings. A persistent cookie, for example, can retain a language preference for a website or recognise that you've already registered for a site, and will automatically prompt you to log in when you get to the website.
  • Tracking cookies are persistent cookies that have a long timeline for expiry, and can be used to keep track of where else a user goes on the internet. Privacy advocates have raised concerns about the information that can be gathered about internet-browsing habits, because these kinds of cookies belong to third-party companies like advertisers, and they collect data on what sites you visit beyond the original website.

How do cookies work?

Cookies recognise if a user is new to the site, or is registered and has recorded preferences for certain content or settings. A news site, for example, uses short-term cookies on its site to verify you when you log on. The news site may also have third-party cookies from marketers and advertisers that will also be installed on your computer when you visit the site.

If you go from that news site to a technology review site, on the next site you visit after that you might see ads for online technology sellers because the cookies have linked these sites together, targeting ads for online technology retailers at you in the hope that you're looking to buy a new gadget.

In this way, advertising companies build a picture of you and target advertising to you that has been closely aligned with your country, gender, interests and other attributes gleaned from your online habits.

How to control your cookie settings

Chrome

Customise > Settings > Show advanced settings then under Privacy > Content settings. There are options to block third-party cookies and blocking sites from setting user data.

Firefox

Tools > Options > Privacy tab and check the box Tell websites I do not want to be tracked.

Safari

Safari > Preferences > Privacy tab > Block cookies > from third parties and advertisers

Internet Explorer 11

Gear icon > Internet options > Privacy > Advanced and then click Override automatic cookie handling to alter the settings. It's possible to allow first-party cookies so that cookies are allowed directly from a website but block third-party cookies that can be used for tracking.

How to delete your cookies

Chrome

Customise > Settings > Show advanced settings then under Privacy > Content settings > All cookies and site data. Select one or all and delete.

Firefox

Tools > Options > Privacy tab and click Remove individual cookies to see a list of all the cookies on your computer. Select one or all and delete.

Safari

Safari > Preferences > Privacy tab > Cookies and other website data > Details > select one > remove, or Remove all > Done.

Internet Explorer 11

Gear icon > Internet Options > Browsing History > Delete and check Cookies and website data box.