Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you check cookies using Chrome?

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?

like image 627
Howdy_McGee Avatar asked Apr 04 '12 16:04

Howdy_McGee


People also ask

How do I check my cookies?

Android ChromeStart Chrome, then open the options menu and scroll down to 'Settings', followed by 'Site setttings'. You can now choose whether to allow sites to save and read cookie data. To view and delete cookies, select 'Data stored' - you will see a list of all the sites which have stored cookies on your device.

How do I find cookies on a website?

For Google Chrome go to View > Developer > Developer Tools or CMD + ALT + I on Mac or F12 on Windows. ‍Now open the Application tab and check the cookies for each domain. Usually the cookies have names that resemble the name of the service they are being used by.


2 Answers

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.

like image 197
AlexMA Avatar answered Oct 04 '22 17:10

AlexMA


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

like image 37
Nick Beranek Avatar answered Oct 04 '22 16:10

Nick Beranek