2 ms·
Cookies are a way for clients (and servers) to add data to HTTP requests. It's a header, plus the expectation that the client will add this data to subsequent r
by javajosh 4y ago
Cookies are a way for clients (and servers) to add data to HTTP requests. It's a header, plus the expectation that the client will add this data to subsequent requests sent within a certain timeframe.
Consider that a similar effect can be achieved by adding an id to every link in the body of a response. But its still just a link. In fact, before cookies this is how you associated requests with each other into a "session". And indeed, this is still a way to do user tracking across domains without cookies and in a way that is impossible to block in general.
What a thing is used for is not the thing itself.
- NovemberWhiskey 4y ago>plus the expectation that the client will add this data to subsequent requests sent within a certain timeframe That's the definition of "client-side state". Cookies have no purpose other than maintenance of client-side state. https://www.rfc-editor.org/rfc/rfc6265 https://www.rfc-editor.org/rfc/rfc6265 "This document defines the HTTP Cookie and Set-Cookie header fields. These header fields can be used by HTTP servers to store state (called cookies) at HTTP user agents, letting the servers maintain a stateful session over the mostly stateless HTTP protocol."