What are Cookies?

saint99599
Computer Science, KMITL
2 min readOct 26, 2022

Cookies are files stored on your computer. Cookies are automatically created when we visit websites. By cookies, it helps to collect information that is on the website, for example, we have visited a particular website. The website will store cookies as various images of the website. when we visit this website the next time images on the web will load faster because of the presence of cookies on the image of the website on our device or to help us remember the passwords of various websites.

Ref : https://www.bettycrocker.com/recipes/ultimate-chocolate-chip-cookies/77c14e03-d8b0-4844-846d-f19304f61c57

Cookies types

1. Session cookies are cookies that temporarily stored in memory. No data stored on the computer. It will be deleted when the website is closed.

2. Persistent cookies are cookies that help collect our information. For us to visit the web next time, there is still have information about the web settings that we set, such as themes, selected languages, and bookmarks. Cookies are stored in the permanent memory of the web. Usually, it takes 1–2 years when the website is not accessed during the above period. The browser will delete cookies.

3. Secure cookies are cookies that are transmitted only through an encrypted connection, such as HTTPS. It will not transmit only encrypted connections such as HTTP. This helps to reduce data eavesdropping.

4. http-only cookies are cookies flagged as HttpOnly is given to the cookies. Makes client-side APIs inaccessible to HTTP cookies and helps prevent cookies from being stolen via cross-site scripting (XSS).

5. Same-site cookies are cookies that control the transmission of cookies between websites with 3 Same-site cookies: Strict, Lax, and None.

5.1. SameSite = Strict: browsers only send cookies to the target domain which is the same as the source domain. This mitigates cross-site request forgery (CSRF) attacks.

5.2. SameSite = None: allow Third-Party Cookies to be used

5.3. SameSite = Lax: Configure your browser to send information in cookies. Go to targets with different domains from the original domain. but is limited to secure commands only.

6. Third-party cookies are cookies that secretly track us, such as browsing history, web usage, etc., not from the website we want.

7. Super cookies are cookies originating from top-level domain, usually blocked by web browsers. If the browser is not blocked Attackers may intercept or falsify legitimate user requests to other websites.

8. Zombie cookies are a cookies that can be recreated even after it has been deleted. Which relies on distribution to many places such as Flash Local shared objects, HTML5 Web storage, etc.

9. Cookies wall are a pop-up cookies with no option to refuse. and cannot access the website without tracking cookies.

Ref : https://tips.thaiware.com/1549.html#what-is-cookie

https://en.wikipedia.org/wiki/HTTP_cookie

--

--