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?
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.
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.
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.
In your console, type document.cookie
. It will return the active cookies for that page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With