Let\'s say I set a cookie using the setcookie()
function in PHP
:
setcookie(\'name\',\'foo\',false,\'/\',false);
I
For Google chrome Version 56.0.2924.87 (Latest Release) cookies are found inside profile1 folder.
If you browse that you can find variety of information.
There is a separate file called "Cookies". Also the Cache folder is inside this folder.
Path : C:\Users\user_name\AppData\Local\Google\Chrome\User Data\Profile 1
Remember to replace user_name.
For Version 61.0.3163.100
Path :
C:\Users\user_name\AppData\Local\Google\Chrome\User Data\Default
Inside this folder there is Cookies file and Cache folder.
Since the expiration time is zero (the third argument, the first false
) the cookie is a session cookie, which will expire when the current session ends. (See the setcookie reference).
Therefore it doesn't need to be saved.
You can find a solution on SuperUser :
Chrome cookies folder in Windows 7:-
C:\Users\your_username\AppData\Local\Google\Chrome\User Data\Default\
You'll need a program like SQLite Database Browser to read it.
For Mac OS X, the file is located at :-
~/Library/Application Support/Google/Chrome/Default/Cookies
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.
On Windows the path is:
C:\Users\<current_user>\AppData\Local\Google\Chrome\User Data\<Profile 1>\Cookies(Type:File)
Chrome doesn't store each cookies in separate text file. It stores all of the cookies together in a single file in the profile folder. That file is not readable.
Actually the current browsing path to the Chrome cookies in the address bar is: chrome://settings/content/cookies