IE/Firefox/Chrome等浏览器保存Cookie的位置

前面写了篇长文( 使用Jmeter登录WordPress的问题 )中也重点是Cookie的问题,这里再简单说下什么是Cookie并且列举一下主流浏览器保存Cookie的位置吧。

什么是Cookie?
A cookie, also known as an HTTP cookie, web cookie, or browser
cookie, is a small piece of data sent from a website and stored in a
user’s web browser while a user is browsing a website. When the user
browses the same website in the future, the data stored in the cookie
can be retrieved by the website to notify the website of the user’s
previous activity. Cookies were designed to be a reliable mechanism for
websites to remember the state of the website or activity the user had
taken in the past. This can include clicking particular buttons, logging
in, or a record of which pages were visited by the user even months or
years ago.

(上面的解释来时wikipedia)

在Windows系统上(这里以Win7为例)浏览器的Cookie

IE浏览器Cookie数据位于:%APPDATA%\Microsoft\Windows\Cookies\ 目录中的xxx.txt文件 (里面可能有很多个.txt Cookie文件)

如:C:\Users\yren9\AppData\Roaming\Microsoft\Windows\Cookies\0WQ6YROK.txt

在IE浏览器中,IE将各个站点的Cookie分别保存为一个XXX.txt这样的纯文本文件(文件个数可能很多,但文件大小都较小);而
Firefox和Chrome是将所有的Cookie都保存在一个文件中(文件大小较大),该文件的格式为SQLite3数据库格式的文件。

Firefox的Cookie数据位于:%APPDATA%\Mozilla\Firefox\Profiles\ 目录中的xxx.default目录,名为cookies.sqlite的文件。

如:C:\Users\jay\AppData\Roaming\Mozilla\Firefox\Profiles\ji4grfex.default\cookies.sqlite

在Firefox中查看cookie, 可以选择”工具 > 选项 >” “隐私 > 显示cookie”。

Chrome的Cookie数据位于:%LOCALAPPDATA%\Google\Chrome\User Data\Default\ 目录中,名为Cookies的文件。

如:C:\Users\jay\AppData\Local\Google\Chrome\User Data\Default\Cookies

在Linux系统上(以Ubuntu 12.04 和 RHEL6.x 为例)浏览器的Cookie

Firefox的Cookie路径为:$HOME/.mozilla/firefox/xxxx.default/目录下的cookie.sqlite文件。

1
2
3
4
master@jay-linux:~/.mozilla/firefox/tffagwsn.default$ ll cookies.sqlite
-rw-r--r-- 1 master master 1572864 Apr 21 16:54 cookies.sqlite
master@jay-linux:~/.mozilla/firefox/tffagwsn.default$ pwd
/home/master/.mozilla/firefox/tffagwsn.default

chrome: 在文件夹./cache/google-chrome/Default/Cache

参考资料:

http://en.wikipedia.org/wiki/HTTP_cookie

http://www.milincorporated.com/a2_cookies.html

http://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data

http://superuser.com/questions/292952/chrome-cookies-folder-in-windows-7

IE/Firefox/Chrome等浏览器保存Cookie的位置的更多相关文章

  1. 简单明了区分IE,Firefox,chrome主流浏览器

    简单明了判断浏览器Firefox:typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().index ...

  2. python模拟浏览器保存Cookie进行会话

    #! /usr/bin/env python # -*-coding:utf- -*- import urllib import urllib2 import cookielib class NetR ...

  3. 兼容IE浏览器保存Cookie

    兼容IE:Response.Cookies[":member"].Expires=DateTime.Now.AddDays(1); 其它浏览器:Response.Cookies[& ...

  4. 浏览器禁用Cookie

    做JavaWeb的都知道Session的底层是使用Cookie来实现的,服务器端会在本地文件中保存session信息,并将sessionID发给客户端(浏览器),浏览器就会把这个sessionID(准 ...

  5. 各浏览器的cookie的name个数/最大容量限制测试

    测试代码 for(var ii = 0; ii< 5000;ii++){ if (!window.ia) window.ia=0; window.ia++; var s = 'a'+window ...

  6. C#后台保存Cookie

    一般是: Response.Cookies["backurl"].Expires.AddDays(2); 但是,IE浏览器保存Cookie用 Response.Cookies[&q ...

  7. 如何从桌面程序向浏览器传递cookie或自定义header

    类似问题 从c#程序启动ie并传递cookie 打开默认浏览器并传递cookie 打开一个web浏览器使用c#应用程序并添加请求头 猜想 从wpf程序打开默认浏览器并定位到一个url ,并且向这个ur ...

  8. 各种浏览器(IE,Firefox,Chrome,Opera)COOKIE修改方法[转]

    各种浏览器(IE,Firefox,Chrome,Opera)COOKIE修改方法[转] 网站通过 Cookie 保存了我们访问网站的信息,在不同的浏览器中修改 Cookie 可以如下操作: Firef ...

  9. 【转】IE8浏览器无法保存Cookie的解决方法

    转自:http://blog.csdn.net/sjsm2007/article/details/17958145 使用IE8浏览器经常出现了无法保存Cookie的故障.每次打开网站需要重新登录,登录 ...

随机推荐

  1. java类集框架图(google找的,备个份)

  2. c++之map

    题目描述:     哈利波特在魔法学校的必修课之一就是学习魔咒.据说魔法世界有100000种不同的魔咒,哈利很难全部记住,但是为了对抗强敌,他必须在危急时刻能够调用任何一个需要的魔咒,所以他需要你的帮 ...

  3. 【转】java开源类库pinyin4j的使用

    最近CMS系统为了增加查询的匹配率,需要增加拼音检索字段,在网上找到了pinyin4j的java开源类库,提供中文转汉语拼音(并且支持多音字), 呵呵,看了看他的demo,决定就用它了,因为我在实际使 ...

  4. Python强化训练笔记(四)——字典的排序

    假如有学生成绩以字典顺序排列:{'Tom': 87, 'Jack': 90, 'Rose': 100.....} 想要根据学生的成绩来进行排序,可以考虑使用sorted函数.但是sorted函数用在字 ...

  5. C++程序设计(三)

    1. 运算符重载 目的:对抽象数据类型也能够直接使用C++提供的运算符.使得程序更简洁,代码更容易理解. 运算符重载的实质是函数重载 返回值类型 operator 运算符(形参表) { -- } 运算 ...

  6. Unit03 - 对象内存管理 、 继承的意义(上)

    Unit03 - 对象内存管理 . 继承的意义(上) 1.内存管理:由JVM来管理的  1)堆:    1.1)存储所有new出来的对象(包含成员变量)    1.2)没有任何引用所指向的对象就是垃圾 ...

  7. Android You need to use a Theme.AppCompat theme (or descendant) with this activity.

    错误描述为:java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with ...

  8. Elasticsearch 配置

    Elasticsearch 配置 Elasticsearch不仅仅是Lucene和全文搜索,我们还能这样去描述它: 分布式的实时文件存储,每个字段都被索引并可被搜索 分布式的实时分析搜索引擎 可以扩展 ...

  9. Nginx下配置SSL安全协议

    生成证书: # cd /usr/local/nginx/conf # openssl genrsa -des3 -out server.key 1024 # openssl req -new -key ...

  10. VS 创建虚拟目录失败,映射到其他文件夹!

    今天,改一哥们项目!立马,问了一下原因.支支吾吾的气死LZ! 算了,就不信自己琢磨不出来!哼 找了半天,坑爹的是在Web.csproj文件中! 用txt打开,发现这个东东! <UseIIS> ...