If you are working on developing web applications, sometimes you want to look http cookies being exchanged for a given HTTP request & response and may want to look at cookies stored for a given domain. In this blog post, let's discuss on both of these requirements.
Viewing cookies being exchanged for a HTTP request and response
I will be using Google Chrome browser to view the cookies being exchanged in HTTP request and response.
In Chrome browser, open a new window and then launch a Developers tool by pressing F+12 key, browse amazon.com and in the developer tools click on Network tab and select first URL in the list.
Then in the right hand side of the developer tools, you will see view sections. Among them are Response Headers and Request Headers sections.
Cookies in Response headers
In the Response Headers, you can see cookies set from server if any.
Cookies in Request headers
In the Request Headers, you can cookies sent to server if any stored for the domain already. In my case I have already got some cookies as part of previous browsing sessions.
Viewing cookies stored for a domain
Chrome provides really nice way of viewing the cookies stored per domain basis.
To view cookies in Chrome, Go to Settings, then to Content Settings. Later Click on “All cookies and site data".
No comments:
Post a Comment