What Are Cookies- And How They Work - Explained for Beginners!

Pattern Smarter
107 followers
52 Video Views·Nov 15, 2022
So, chances are you've been browsing the internet
and you've seen a notification like this
pop up on your screen telling you
that this website uses cookies.
Most of the time, you just slap that agree button
and go about your merry way.
But you're likely here because you wanna know
what exactly are cookies and how do they work?
Well, it's not that sweet, artery-clogging goodness
that grandma whips up in the kitchen.
We're talking about website cookies,
which are more formally called HTTP cookies.
So, a cookie is a small piece of data
from a specific website that is stored
on a user's computer while they're browsing the web.
And they can have many functions,
such as keeping track of a user's browsing activity
in order to serve up targeted information,
such as ads for goods or services.
This is why when you're browsing Amazon
for a Halloween costume for your dog,
you might see ads for more dog costumes
on Facebook later that day.
Cookies can also have simple functions,
like remembering your login details
for a specific website, such as Facebook,
so that you can close out of it
and then reopen it again later
without having to log back in again.
Cookies can also allow website owners
to track exactly how many unique visitors
they're getting to their website,
because each cookie has its own unique ID.
So, if a user visits the same website
two or three times in a day,
a cookie can allow us to count this as one unique viewer.
So, website owners can collect more accurate data
about their website traffic.
So, where did the cookie come from,
and how did it get its name?
Well, the first cookie was invented in 1994
by a 24-year-old programmer for Netscape Communications
named Lou Mantulli.
He was creating an online store
for a company that said that their servers
were getting too full from storing
each individual user's shopping cart data
while they were browsing the store.
So, Lou was asked to figure out a way
to store each user's shopping cart data
on their own computer,
which would then save server space for the company
and save them money.
So, he thought back to an old computing token
called the magic cookie,
which was used to identify
when somebody would log into a system
by passing a tiny bit of information
between the server and their computer.
Lou then recreated this concept for web browsing,
and thus, the modern-day cookie was born.
Cookies today are still used to identify your computer,
but now they have the added function
of also tracking your activity,
which can be very helpful or a breach in privacy
depending on how the website decides
to use this information,
which is why you get that little notification
whenever you visit a website that uses cookies
because they're legally obligated to inform you
in their cookie policy of what they use these cookies for.
And now, for the age-old question,
how does a cookie work?
Well, when you visit a website for the first time,
let's just say, for this example, it's an online store.
The website puts a cookie on your hard drive
that has its own unique identification code.
The site then uses this ID to keep track of your session,
the session being your overall visit on their website
from start to finish.
The reason it does this is to keep track of things
like which items you put in your shopping cart
or which items you looked at
so it can suggest similar items
or even save coupon codes for you that can be used later
even if you close out of the website and come back to it.
And they have many more functions than this,
but this is just some of the most common ways.
Now, a cookie is only specific to that website,
meaning that they can't track you
on a totally different website.
Or can they?
Well, there's another type of cookie
called a third-party cookie,
which I will explain with an example.
Let's say that you're browsing around a website
that has a button to like or share on Facebook
embedded into it.
Well, this button has to talk to facebook.com,
which means that Facebook can now send their own cookies
through this website in order to track your activity
and then most likely serve up some targeted ads for you
on your Facebook newsfeed later.
It's stuff like this that push Europe to institute the GDPR,
which is the General Data Protection Regulation,
which allows users to opt out of the use of cookies
if they so choose.
But not all cookies are privacy-breaching parasites,
and they will generally help you have
a much more enjoyable user experience on the web
and save you lots of time and headache.
All right, guys, so that was a breakdown
of what are cookies and how do they work.
If you enjoyed this video, please hit that like button,
or if you wanna get more website-related questions answered
or learned how to create professional
and beautiful websites from home,
then consider subscribing to my channel.
You won't be sorry.
All right, guys, thank you for watching,
and I will see you on the next video.
