Let's take a look at the basics of web cookies, how they're used, and why these messages are so prevalent online.
What Are Cookies?
Cookies, also known as web cookies or browser cookies, are pieces of data that web servers save to your computer when you access websites. Their name comes from "magic cookie", which is an old-school term for a packet of data that a program passes on without making any changes to it.
Cookies store various pieces of information about your browsing session; you can have many cookies from one website on your machine at once. When you visit a website later, your browser can send those cookies to the website to provide information, or the site can read the cookies on your system to glean these details.
Your web browser facilitates the handling of cookies, so you don't have to do anything to create or manage them. However, you can choose to reject or delete them, which we'll look at in a bit.
What Are Cookies Used For?
Cookies come in several forms, last for different periods of time, and have various uses.
The most frequent reason for websites to put a cookie on your computer is to keep track of your session on that site. For example, if you add a product to your cart on a retailer's website and then navigate to a different product page, the first product will remain in your cart. This is because the site stores a cookie containing the contents of your cart, allowing you to browse without having to add those products again.
In many cases, cookies like this are temporary. Once you exit the webpage or close your browser, that cookie disappears and resets your state with that site. However, there are also persistent cookies. As the name suggests, these last much longer than a single session.
A common example of a persistent cookie is one that keeps you logged into websites. When you check the Keep me signed in or similar box upon logging in, the site sets a cookie to remember who you are. Then, next time you open the website, you're automatically logged in without having to enter your credentials again.
Both of the above are examples of first-party cookies, which are set by the site you're visiting. But third-party cookies, set by something other than the current website, are also all over the web.
Typically, these cookies allow advertisers and analytic services to learn more information about you. Websites can read third-party cookies set by other sites, which allows them to see where you've visited on the web. In turn, this lets advertisers build a more accurate profile of your interests.
These privacy concerns have led to new legislation around the world, explaining the cookie prompts you see all the time.
Why Do Websites Ask About Cookies?
The primary reason that every website tells you that it saves cookies and asks for your permission to do this is because of a law called GDPR, short for General Data Protection Regulation. This is a European Union law that became enforceable in May 2018.
Most of the time, these prompts aren't very user-friendly. They provide an Accept All cookies button, but if you want to reject some types of cookies, you have to click Manage Preferences and turn off many individual sliders. And some sites simply state that by continuing to use the website, you are authorizing it to set cookies.
This is likely done so that people just click Accept All to get rid of the prompt—allowing sites to continue tracking all data.
Most sites have a category for Essential Cookies that are required for the site to function as intended. But you can typically block third-party cookies that are primarily used for tracking purposes.
It's not just the EU that has a law like this. The California Consumer Privacy Act (CCPA), which went into effect around the same time, also includes regulations about users giving consent for companies to collect their data.
Are Cookies Dangerous?
Cookies are not dangerous or a problem in and of themselves. They're an important way to make the web more convenient, and disabling all cookies would make your experience online a lot worse. However, like most other elements on the internet, they can be use for good or bad.
The biggest issue with cookies, as we've seen, is that they can reveal information about your browsing history. Advertisers can look at all the cookies on your computer to figure out where you've been, what your interests are, and similar. They can then trade this information with other parties to show you more relevant ads.
If you want more control over cookies, you can change settings in your browser. In Chrome, for example, under the Privacy and security section, the Cookies and other site data section holds the relevant options. This lets you choose whether to allow all cookies, block third-party cookies, or block cookies entirely.
You can also delete all cookies every time you close your browser, as well as choosing specific behaviors for some sites. For increased privacy, try disabling third-party cookies. Blocking all cookies will cause websites to misbehave.
Firefox, with its focus on privacy, automatically blocks tracking cookies and other forms of data collection. Consider using this browser for more protection.
Cookies Aren't Just for Dessert
Now you understand how cookies work and why they're so central to the online world. While they have privacy-invading uses, they're also important for websites to offer a smooth user experience.
To learn more, take a look at what happens when you visit a website next.