3 ms·
This blog post has a bunch of misconceptions. To start off, cookies are not files. HTTP Cookies is the umbrella term for a feature where the user agent (i.e.,
by chipdart 2y ago
This blog post has a bunch of misconceptions.
To start off, cookies are not files.
HTTP Cookies is the umbrella term for a feature where the user agent (i.e., browser) is expected to not only store the data that servers include in responses to HTTP requests through a specific HTTP response header (Set-Cookies) but also send all that data in subsequent requests through by adding it in a specific HTTP request header (Cookies).
Unlike any other HTTP request header and response header, what makes cookies special is the special behavior that's expected from user agents: storing whatever the server includes in the Set-Cookies response header and send that data back in all subsequent requests in the Cookies request header.
The whole point of cookies is to turn a stateless protocol such as HTTP into a stateful protocol by ensuring that user agents have the responsibility of keeping track of state and save state transitions specified by the server.
Nothing specifies how a user agent should store cookies, or even if it has to store them. Nowadays some mainstream browsers like Firefox even provider users with the ability to not keep cookies at all and wipe them all when closing the app.