COOKIES
HTTP cookies, commonly just called cookies, were originally intended to store session information on the client. The specification called for the server to send a Set-Cookie
HTTP header containing session information as part of any response to an HTTP request. For instance, the headers of a server response may look like this:
HTTP/1.1 200 OK
Content-type: text/html
Set-Cookie: name=value
Other-header: other-header-value
This HTTP response sets a cookie with the name of "name"
and a value of "value"
. Both the name and the value are URL-encoded when sent. Browsers store such session information and send it back to the server via the Cookie
HTTP header for every request after that point, such as the following:
GET /index.jsl HTTP/1.1
Cookie: name=value
Other-header: other-header-value
This extra information being sent back to the server can be used to uniquely identify the client from which the request was sent.
Restrictions
Cookies are, by nature, tied...