Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does Chrome store cookies?

Let's say I set a cookie using the setcookie() function in PHP:

setcookie('name','foo',false,'/',false); 

I can see it in:

chrome://settings/cookies  

However, I can not find the actual file stored on my hard disk. Can anyone tell me where this specific cookie is stored on the hard disk?

like image 228
Kobayashi Avatar asked Jun 24 '15 08:06

Kobayashi


People also ask

Where do cookies get stored?

If you're wondering “where are cookies stored,” it's simple: your web browser will store it locally to remember the “name-value pair” that identifies you. If a user returns to that site in the future, the web browser returns that data to the web server in the form of a cookie.

Where does Chrome store all data?

By default, this file is located in %APPDATA%/Google/Chrome. The file can also be stored in %ONEDRIVE%/Google/Chrome by changing the roaming profile location to OneDrive. If you change or redirect the location of this file, be aware of possible effects on synchronization or simultaneous Chrome Browser sessions.

Does Google Chrome store cookies?

If you're wondering, “Where are cookies stored in Chrome?”, the answer is simple: Google Chrome stores all its cookies in a single file called Cookies.

Where does Chrome store cookies on a Mac?

Where Are Chrome Cookies Files Stored on Mac? The chrome cookies files are stored in the Library folder on your Mac. To access it, open Finder on Mac and click on Go and choose Go to Folder from the menu. Then type ~/Library/ in the search bar and click on the first result.


2 Answers

The answer is due to the fact that Google Chrome uses an SQLite file to save cookies. It resides under:

C:\Users\<your_username>\AppData\Local\Google\Chrome\User Data\Default\ 

inside Cookies file. (which is an SQLite database file)

So it's not a file stored on hard drive but a row in an SQLite database file which can be read by a third party program such as: SQLite Database Browser

EDIT: Thanks to @Chexpir, it is also good to know that the values are stored encrypted.

like image 76
Kobayashi Avatar answered Oct 22 '22 06:10

Kobayashi


For Google chrome Version 97.0.4692.71 (Latest Release) cookies are found inside the Network folder.

There is a file called "Cookies".

Path : C:\Users\user_name\AppData\Local\Google\Chrome\User Data\Default\Network

Remember to replace user_name.

like image 45
MFKDGAF Avatar answered Oct 22 '22 04:10

MFKDGAF