Cookies — FAQs

Fatimat Gbajabiamila
Junior Dev Diaries
Published in
5 min readMar 3, 2020

Have you ever wondered why websites are asking you to accept cookies every time? Do you often wonder what the cookies are or what they are used for? The FAQ below answers some of the questions you might have asked yourself about cookies.

What are they?

Cookies contain information saved on your computer by a website you visit. On your first visit to a site, some websites would download and/or send small pieces of data from the site to your computer. The file is stored in your browser’s folder or subfolder.

A cookie often contains the name of the cookie(set by the website creator), the value(alphanumeric, usually unique), the domain(i.e website) the cookie is for, the path/page of the website, cookie expiry date and if the cookie is secure or not.

What are cookies used for?

Cookies are intended to help improve your experience on a website and often to add more unique functionality.

The most common use case of a cookie is to help websites creators keep track of your visits and activity. When people hear the word ‘track’, they often panic and conclude that it is a bad thing which, to be honest, is a fair reaction in this day and age.

An example of what I mean could be when you log in to a website for the first time. The website creator can save a unique identifier to the browser’s cookie to assert that the user has logged in. The next time you visit the website, it checks if you have this cookie so the website will not ask you to log in again. We can all agree that’s a good thing, right?

Some online retailers could also use cookies to save items you put in your basket. If they didn’t do this, every time you refreshed the page, you would lose all the items in your basket and have to go through the process of adding it all again each time. I know for sure that would annoy me!

A social network(i.e twitter, facebook) might use cookies to keep a record of all the links you have clicked on the site. Using this record, they are able to tailor advertising/marketing on the site to you.

Why do I have to accept that annoying cookie policy thing?

The General Data Protection Regulation (GDPR) came into force on 25 May 2018. I personally remember getting loads of emails from different websites, asking me to opt in or opt out of their subscribers list- this is an effect of GDPR.

GDPR was designed to give you more control over what information a company has about you, ensures companies are more transparent about what they are using your data for and gives you the right of access to the data the company has about you for free within reason. Asking you to accept the cookie policy is one of the ways companies are trying to comply with GDPR, by asking you to opt in and giving you access to their cookie policy. Website creators are also obligated to tell you what they are storing in the cookies, this is usually referred to as “Cookie policy” and can be found in the same section of the site that asks you to accept the policy.

Can I decline the cookie policy?

You can, but they will keep asking you each time you go back on to the website. In some cases, you will not be able to access a website if you do not accept the cookie policy. This is often because the website won’t work as designed to if you don’t as they will not be legally allowed to save anything to the text file that stores your cookies. In other cases, you are given access only to pages on the site that do not use any data stored in the cookie. What happens when you decline is up to the website creator.

Do they contain my personal data?

Ultimately, the data stored in a cookie is determined by the creator of the website. It is not good practice for them to store identifiable information in the cookie. In any case, the value of the cookie often contains numbers and letters that only the website you are visiting can understand. This is because the data is usually encrypted — easy for a machine to understand but not so easy for us humans to read.

Can I see what is stored in a cookie?

Browsers have different ways you can access your cookies. Below are where you can find your cookies in commonly used browsers:

You can also delete your cookies using the links above.

Do cookies expire?

There are two main ways website creators use to determine how long a cookie is stored on your device. This can either be via a session cookie or a persistent cookie. A session cookie is saved as soon as you visit a website and disappears as soon as you close it. It is only used by the website on a per-visit basis. A persistent cookie, however, has a future expiry date set by the website creator. This cookie is saved on your computer’s hard drive so even if you close the website that sets it and then go back on a later date, from your hard drive, it can still use the cookie originally stored.

How do cookies help companies with advertising?

Cookies were designed to only be read by the website that creates them. When you log in to a site like Facebook, it stores a cookie on your computer so that next time you visit the site, it checks for that cookie to make sure you are logged in. That cookie is unique to Facebook and cannot be read by other sites.

However, there is another type of cookies known as third-party cookies, they piggyback off the original website you visited and are mostly added to your computer by advertisers. Advertising companies use third-party cookies to keep track of what ads you’ve seen, or what ads your browser has been exposed to helping them to show ads that are relevant to your browsing habits.

For example, when you visit a website with a banner ad from a site like Boohoo, your browser is communicating with the site and the advertiser. The advertiser that placed the Boohoo banner ad on your website assigns your computer a unique identifier number that is stored in your cookie text file. Then, let’s say you visit another website with the same advertiser’s Boohoo banner ad. When you arrive at this new website, the advertiser will check to see if you have the unique ID from them and will use that to show you related ads. They also store information about whether or not you clicked the ads you’ve seen, and record information about the site you saw the banner ad on.

In summary, Cookies were not originally designed to track you or invade your privacy online, however, some website creators do abuse it. Every company asking you to accept cookies will also provide you with a link to their Cookie policy. You can read the policy to see what the website uses your cookies for to help you make a more informed decision about whether accepting is worth it to you.

Hope you found this useful. Get in touch via twitter @fg_webdev

--

--