HanuAthena HanuAthena - 6 months ago 82
HTTP Question

How are cookies passed in the HTTP protocol?

How are cookies passed in the HTTP protocol?

Answer

The server sends the following in its response header to set a cookie field.

Set-Cookie:name=value

If there is a cookie set, then the browser sends the following in its request header.

Cookie:name=value

See the HTTP Cookie article at Wikipedia for more information.