How do you check cookies using Chrome?

93,642

Solution 1

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

In your console, type document.cookie. It will return the active cookies for that page.

Solution 3

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

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

On the latest version of chrome Chrome v85 the url is:

chrome://settings/siteData

Share:
93,642
Howdy_McGee
Author by

Howdy_McGee

I'm a Web Developer who is constantly learning the trade. I've built and manage 100+ WordPress websites with the help of the talented Web Designers around me. I'm currently looking for ways I can help the WordPress community grow and maintain its awesomeness! ~ Alex

Updated on June 26, 2021

Comments

  • Howdy_McGee
    Howdy_McGee almost 3 years

    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?

  • Howdy_McGee
    Howdy_McGee about 12 years
    Over the last week I'm starting to realize how awesome the JS console is! Thanks!
  • psiphi75
    psiphi75 almost 11 years
    In Linux the JS console is just the [CTRL]+[Shift]+i keys away... and a click on the "Console" tab.
  • Alf Kåre Lefdal
    Alf Kåre Lefdal almost 8 years
    In recent versions of Developer Tools the tab is called "Application"
  • Joseph Cho
    Joseph Cho over 5 years
    This is out of date. The updated location is here: stackoverflow.com/a/48083367/4842949
  • Nabi K.A.Z.
    Nabi K.A.Z. about 5 years
    Why the document.cookie no contain of some cookies, but I can see that in the chrome://settings/siteData ?!!!
  • Nabi K.A.Z.
    Nabi K.A.Z. about 5 years
    @DaFi4 Yes, Also I have this problem. The document.cookie no contain of some cookies, but I can see that in the chrome://settings/siteData !!!
  • AlexMA
    AlexMA about 5 years
    @NabiK.A.Z. Likely chrome is showing you cookies from a different domain. See “same origin policy”
  • Nabi K.A.Z.
    Nabi K.A.Z. about 5 years
    @AlexMA No, seem the problem caused of option HTTP Only cookie, but the site opened on the HTTPS. But does can not see cookies in console by js, of same domain on the HTTPS?!
  • Chris Rice
    Chris Rice over 4 years
    @NabiK.A.Z. The HttpOnly tag on cookies is somewhat misleading, but it does not mean the cookie is only sent when the protocol is http (vs https). The meaning of an HttpOnly cookie is that it is sent by the browser but it is not visible to JS. This is not to be confused with the Secure tag on cookies, which means the browser will only send it to sites using https (but which has no effect on the cookie's visibility in JS). There's a good description on: developer.mozilla.org/en-US/docs/Web/HTTP/Cookies
  • Subham Tripathi
    Subham Tripathi about 4 years
    It will return the active cookies for that page. - This worked for me , Thanks.