A cookie, also known as an HTTP cookie, web cookie, or browser cookie, is a string of text sent from a web server to a user's browser that the browser is expected to send back to the web server in subsequent interactions.
- The domain and path define the scope of the cookie - they tell the browser that cookies should only be sent back to the server for the given domain and path.
- Cookies that do not have a specific expiration date and time are automatically deleted when the web browser is next closed. Cookies with a set expiry time are considered persistent cookies, while cookies without set expiry times are considered session cookies.
In online advertising, cookies generally store a unique identifier, and may contain information like what ads were recently seen (for frequency capping), when the cookie was created (to discover short duration identities), and other simple attributes.