Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

HTTP headers | Cookie

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

HTTP headers are used to pass additional information with HTTP response or HTTP requests. A cookie is an HTTP request header i.e. used in the requests sent by the user to the server. It contains the cookies previously sent by the server using one or more set-cookie headers. It is an optional header. 


Cookie: <cookie-list>

In case of single cookie syntax is as follow:

Cookie: name=value

In case of multiple cookies syntax is as follow:

Cookie: name=value; name=value; name=value

Directives: This header accept a single directive mentioned above and described below:

  • <cookie-list> It is the list of name=value pair separated by ; and space i.e ‘;’.

Example 1:

Cookie: user=Bob

Example 2:

Cookie: user=Bob; age=28; csrftoken=u12t4o8tb9ee73

To check this Cookie in action go to Inspect Element -> Network check the request header for Cookie like below, Cookie is highlighted you can see. Supported Browsers: The browsers are supported by HTTP Cookie header are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Apple Safari
  • Opera
My Personal Notes arrow_drop_up
Last Updated : 28 Oct, 2022
Like Article
Save Article
Similar Reads
Related Tutorials