Chrome在哪里存储Cookie? [英] Where does Chrome store cookies?
问题描述
假设我使用 PHP
中的 setcookie()
函数设置Cookie:
Let's say I set a cookie using the setcookie()
function in PHP
:
setcookie('name','foo',false,'/',false);
我可以看到:
chrome://settings/cookies
找到存储在我的硬盘上的实际文件。任何人都可以告诉我这个特定的cookie存储在硬盘上的位置。
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?
推荐答案
Google Chrome使用SQLite文件保存Cookie。它位于:
Apologies, 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\
内部 Cookie
文件。 (这是一个SQLite数据库文件)
inside Cookies
file. (which is a SQLite database file)
因此,它不是存储在硬盘驱动器上的文件,而是可以由第三方程序读取的SQLite数据库文件,例如: SQLite数据库浏览器
So it's not a file stored on hard drive but a row in a SQLite database file which can be read by a third party program such as : SQLite Database Browser
到@Chexpir,也很好知道这些值是加密存储的。
Thanks to @Chexpir, it is also good to know that the values are stored encrypted.
这篇关于Chrome在哪里存储Cookie?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!