Reputation: 10635
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?
Upvotes: 80
Views: 132243
Reputation: 10192
To check the current page's cookies using Chrome:
Option 1
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.
Upvotes: 128
Reputation: 4214
On the latest version of chrome Chrome v85
the url is:
chrome://settings/siteData
Upvotes: 3
Reputation: 3556
Latest version of Chrome (v52) has moved this functionality to the "Application" tab. So updated steps are:
Upvotes: 7
Reputation: 56626
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.).
Upvotes: 6
Reputation: 149
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.
Upvotes: 1
Reputation: 2751
In your console, type document.cookie
. It will return the active cookies for that page.
Upvotes: 25