What are cookies?
An HTTP cookie (web cookie, browser cookie) is a small piece of data that a server sends to a user's web browser. The browser stores the cookie and sends it back with subsequent requests to the same server. Cookies are used for session management, personalization, and tracking.
Types of cookies
- Session cookies: Temporary cookies deleted when the browser closes
- Persistent cookies: Remain on the device until they expire or are deleted
- First-party cookies: Set by the website the user is visiting
- Third-party cookies: Set by a domain other than the one the user is visiting, often used for tracking and advertising
Privacy implications
Third-party cookies enable cross-site tracking, raising privacy concerns. Modern browsers increasingly block third-party cookies by default, and regulations like GDPR require informed consent for non-essential cookies.