What Is a Cookie?

“All these websites are asking me to accept their cookies. But I never received a single cookie.” 🙁

Internet cookies are small files that your browser downloads from the websites you visit. They go by many names, including cookies, browser cookies, and HTTP cookies.

Once downloaded, cookies are stored on your computer for various reasons. Some of these reasons are practical and beneficial, while others might not have your best interest in mind.

For example, some cookies store form data so that you don’t have to re-enter it manually. They also keep you logged in while you browse a website so that you don’t have to log in too often.

Others, however, are used to track your behavior across one or more websites to serve highly targeted ads. As you can imagine, such cookies raise privacy concerns.

So, What Does the Law Say?

You’re only allowed to eat up to two cookies per day. No, but seriously, various restrictions have been set in place globally to regulate the abuse of internet cookies.

Thanks to cookie laws, websites have to ask you for permission before your browser can download their cookies. Not only that, but they have to list the type of cookies they use.

This is very important because cookies store a lot of personal information, such as your name, IP address, login credentials, and financial information.

Types of Cookies

Just like edible cookies, internet cookies come in different flavors and forms. They can differ from one another based on where they are stored, how long they persist, and how secure they are.

Session cookie

Session cookies are stored temporarily in RAM while you browse a website. Your browser automatically removes these cookies as soon as you close a website.

Persistent cookie

A persistent cookie, also known as a tracking cookie, expires after a specific time period. This period is defined by web developers.

Supercookie

Regular cookies are usually associated with a specific domain, such as domain.com. Supercookies, on the other hand, are associated with top-level domains, such as .com.

This means that a .com supercookie will have access to any .com domain. Thankfully, most modern browsers block this type of cookie because it’s a major privacy concern.

Zombie cookie

These cookies are stored outside your browser’s default cookie directory. They can then recreate regular cookies once the browser removes them.

First-party cookie

First-party cookies belong to the same website your browser downloaded them from. So they’re usually helpful and improve your overall browsing experience.

Third-party cookie

Third-party cookies are not directly associated with the website your browser got them from. Instead, they are used across websites to track your behavior and serve targeted ads.

Secure cookie

Cookies with the Secure tag can only be transmitted via HTTPS connections. This limit makes it harder for hackers to steal cookies and obtain sensitive information.

HTTP-only cookie

Cookies containing the HttpOnly tag tell the website’s server that their data should not be shared outside the server. As a result, they’re great for protecting against attacks such as cross-site scripting.

Same-site cookie

Cookies with the SameSite tag tell the browser to only send them back to the same domain they originated from. This tag is a great way of protecting against cross-site request forgery.


Published version: Internal documentation / not publicly available.

Task: Explain internet cookies and types in a funny way in 500 words.

Client: Arizona college.