How You’re Being Watched on the Internet

A beginner’s guide to the necessary evil of browser cookies

Bassel Ghazali
Technology Simplified
6 min readFeb 21, 2023

--

Photo by Julissa Capdevilla on Unsplash

Do you know that feeling when you walk into a store in the mall, and there’s a sales assistant watching your every move? Thanks to data files called cookies, companies can do this online as well.

Internet browsers use cookies to help identify us and gather information on us which can provide services like logins and shopping carts.

Cookies also create room for data privacy breaches. They allow websites to gather data as if they were looking over our shoulders while we browsed their website. They can track how we browse their page and exactly what we click on as if they’re sitting next to us and taking notes as we browse.

Much like raisin cookies, computer cookies are problematic despite the benefits they bring. However, computer cookies don’t deceive you into thinking you’re getting chocolate until you bite them, so it’s obvious which of the 2 is the crime here.

This article will be a gentle introduction to cookies and your data privacy. We’ll explore how cookies work, what they do (both good and bad), and how we can protect ourselves online.

What can a company see about us online?

I started an e-commerce business recently. This is a relevant anecdote but also a shameless plug, check out Lineart.

I use a service provider called Shopify, where I get a dashboard to see what my customers are doing. This was my first time seeing data as a business owner instead of a customer, and I was amazed by how much I could see.

Seeing the dashboard prompted me to look into what more I can do; if I can do it, bigger companies can do far more.

Screenshot of how I could see data from people who visit my website

I was able to see who was on my website, where they were in the world, and whether they had anything in their carts or were checking out. I could also see all their past orders, how they spend their time on the website, and trends in their browsing.

When somebody bought something, I got to see what they ordered, how they paid, and where they were shipping to. I couldn’t see their payment details.

My website couldn’t have gathered this data without the use of cookies.

P.S. I value my customers’ privacy and don’t misuse or share any of the data from the website; the visitor in the screenshot is my device.

What cookies do

When we visit a website, we make an HTTP request to the server so we can see the site. If that sentence didn’t make sense, here’s a primer on how the internet works.

The problem with these requests is that HTTP has no memory; websites you talk to can’t remember you or what you’ve done in previous requests. If you log into Facebook, the server will know that you have verified your identity and let you see your posts. If you then click on your friend’s page, your device will send an HTTP request to get the page info, but the server won’t remember that you’re logged in and have permission to see their profile. You would have to log in again. Every single time.

Cookies solve this.

A cookie is a small file created by servers we visit. They are stored on our devices and keep track of information about us. They have 3 functions:

  1. Session management: tracking whether we’re logged in or not, and what our preferences are.
  2. Behaviour on the website: tracking how long we stay, what we click on, etc.
  3. Personalising content: ads use the information gathered by cookies to find the most relevant content to show us.

How cookies work

A website may send a cookie to your browser when you visit it. Your browser then stores the cookie on your device. The next time you visit the website, your browser sends the cookie back to the website. This allows the website to remember your preferences and other information about you.

For example, if you visit an online shopping website and put some items in your cart, a cookie will be created to remember those items. If you close your browser and come back to the website later, the items will still be in your cart because the website retrieved the cookie that stored that information.

Cookies can also be used to track your browsing behaviour across multiple websites. Advertisers can use this information to show you targeted ads based on your interests; if Amazon sees that you’re browsing their store for ski equipment, a cookie will store this. When you then visit other websites shortly after, you can expect to see ads for ski resorts.

What’s currently on our devices?

Cookies from every website we have visited are stored on our browsers.

The cookies from LinkedIn may store our login status and help track our behaviour on the site. This can be things like how long we spend on the site, what areas of the page we stop scrolling for, where our mouse moves to, and what things we click on.

Amazon may also use cookies to store our login status and our behaviour on their site but then take it a step further to memorise what we placed in our shopping carts, allowing us to keep the items in the cart even after closing the site and revisiting later.

You can delete the cookies from your computer, but you will be logged out of those websites and miss out on a personalised experience.

The privacy concern

Websites are legally obligated to let us opt in or out of data collection in some regions like the EU; we are allowed to reject certain cookies.

The trade-off between privacy and convenience is a personal choice. You can choose to be tracked and lose your privacy to get a highly personalised experience, or you can forgo the benefits and maintain your privacy.

You can search for how to delete cookies from your specific web browser (Chrome, Mozilla Firefox, etc.) if you want to delete your cookies. Keep in mind that they will be re-created when you visit the website unless you opt-out.

There are some quick wins you can achieve without sacrificing convenience,

  1. Avoiding cookies on unencrypted websites — reject/delete cookies on websites starting with http:// instead of https:// as they are not secure and your data will not be protected as it should be.
  2. Rejecting all non-essential cookies — most websites have an annoying pop-up asking us to allow cookies. We tend to click “allow” to get it off our screen, but if we reject non-essential cookies through this pop-up, we prevent a lot of unnecessary tracking, at the cost of personalised content like ads.
  3. Avoiding third-party cookies — some websites will collect data to then sell it to third-party companies, such as advertisers. You can’t control what that third party then does with that data, so it is always worth opting out of this where possible. You wouldn’t want your personal information leaked or stolen!

Are they worth it?

We can’t entirely avoid having cookies on our computers but that’s okay because they make our internet experience much smoother. However, with a bit of education, we can protect our privacy by taking some simple steps.

Do you feel the benefits of cookies are worth the data they collect? I’d love to hear your thoughts in the comments!

--

--

Bassel Ghazali
Technology Simplified

Techie, photographer, digital artist and nature-lover. I write about these areas, sometimes individually, sometimes together.