How do you check cookies using Chrome?

JavascriptDebuggingGoogle ChromeCookiesDeveloper Tools

Javascript 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

  1. Open Developer Tools (usually F12)
  2. Click the "Application" tab (used to be "Resources")
  3. Expand the "Cookies" list item
  4. 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:

  1. Open Developer Tools
  2. Click the "Application" tab
  3. 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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionHowdy_McGeeView Question on Stackoverflow
Solution 1 - JavascriptAlexMAView Answer on Stackoverflow
Solution 2 - JavascriptNick BeranekView Answer on Stackoverflow
Solution 3 - JavascriptquicklikerabbitView Answer on Stackoverflow
Solution 4 - JavascriptROMANIA_engineerView Answer on Stackoverflow
Solution 5 - JavascriptJoseph ChoView Answer on Stackoverflow
Solution 6 - JavascriptAriView Answer on Stackoverflow
Solution 7 - JavascriptkamalView Answer on Stackoverflow