Chrome 在哪里存储 cookie? [英] Where does Chrome store cookies?

查看:44
本文介绍了Chrome 在哪里存储 cookie?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我使用 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.它位于:

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

C:Users<your_username>AppDataLocalGoogleChromeUser DataDefault

Cookies 文件中.(这是一个 SQLite 数据库文件)

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

所以它不是存储在硬盘驱动器上的文件,而是存储在 SQLite 数据库文件中的一行,可以被第三方程序读取,例如:SQLite数据库浏览器

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

感谢@Chexpir,很高兴知道这些值是加密存储的.

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

这篇关于Chrome 在哪里存储 cookie?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆