How do you check cookies using Chrome?
JavascriptDebuggingGoogle ChromeCookiesDeveloper ToolsJavascript Problem Overview
I'm testing some cookies that I'm creating via JavaScript. Is there a way to check if the cookie was set in Chrome Developer Tools or something similar?
Javascript Solutions
Solution 1 - Javascript
To check the current page's cookies using Chrome:
Option 1
- Open Developer Tools (usually F12)
- Click the "Application" tab (used to be "Resources")
- Expand the "Cookies" list item
- Click any list item.
You can view cookies in detail here, and clear them out (click any list item under cookies then click the cancel icon on the bottom left of the table).
Option 2
Use the javascript console, e.g. document.cookie
. Less sophisticated (graphically), but you can work with the data using javascript. Note that the results will be restricted based on how websites are allowed to access local data from other sites (see MDN Same-origin policy).
Option 3
There is also chrome://settings/siteData
(was previously settings/cookies). Just put the url into Chrome's address field.
Solution 2 - Javascript
In your console, type document.cookie
. It will return the active cookies for that page.
Solution 3 - Javascript
Latest version of Chrome (v52) has moved this functionality to the "Application" tab. So updated steps are:
- Open Developer Tools
- Click the "Application" tab
- Cookies are listed under the "Storage" list item on the left sidebar
Solution 4 - Javascript
Another method is to type the following:
chrome://settings/cookies
in the address bar.
Then use the left click to see more details (content, expiration date, etc.).
Solution 5 - Javascript
On the latest version of chrome Chrome v85
the url is:
chrome://settings/siteData
Solution 6 - Javascript
On chrome version 61:
chrome://settings/content/cookies
Solution 7 - Javascript
You can also use web developer tool which not only helps you to view cookies but also helps you to display.delete (session,domain,path) cookies individually.