How are cookies passed in the HTTP protocol?

jai picture jai · Aug 12, 2010 · Viewed 231.6k times · Source

How are cookies passed in the HTTP protocol?

Answer

deinst picture deinst · Aug 12, 2010

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.