Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access all stored cookies

Tags:

I want to access my Chrome stored cookies from the JavaScript console. Is this possible?

like image 977
dan Avatar asked Feb 25 '11 23:02

dan


People also ask

Where are all cookies stored?

All the cookies are also stored in a single file called Cookies. Launch File Explorer and insert the following path into the address bar: “C:\Users\Your_User_Name\AppData\Local\Microsoft\Edge\User Data\Default” - remember to replace Your_User_Name with the name of your Windows 10 user account.

Can a website access all cookies?

No. Cookies are stored on the hosting web server. One would have to have access to that server or at least to the web site that stores the cookies. Besides, cookies are of no value to anyone besides the cookie maker.


1 Answers

If you only need the cookies for the active site: Have a look at document.cookie. It contains semicolon-separated key=value pairs.

Edit: Note that due to security concerns you can't access cookies from a different domain. When you run something from the console, it's the equivalent of it running directly from the page, so since they don't want a spam site getting your Facebook credentials, you'll have to go to each website separately.

like image 196
ThiefMaster Avatar answered Oct 02 '22 09:10

ThiefMaster