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. junit测试框架

    import junit.framework.Assert; import org.junit.After; import org.junit.Before; import org.junit.Tes ...

  2. 在VPS上部署fq环境

    VPS购买地址 1. 由于我选择的是CentOS 6 x86版本, 需要安装如下准备工具: git, gcc-c++, zlib-devel, openssl-devel, pcre-devel 2. ...

  3. HDU 5919 Sequence II(主席树+逆序思想)

    Sequence II Time Limit: 9000/4500 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) To ...

  4. NEC学习 ---- 模块 -文本圆角背景导航

    下图是效果图: 然后, 左右两边的圆角图片和背景图片如下 (因为截图工具的原因, 可能图片不是很清晰. 这个图片有4个部分, 分别是中间的背景图, 左右圆角以及栏目分隔白线) 思路: 利用inline ...

  5. RESTful框架调研

    背景 当前的开放服务平台发展趋势,是服务使用者变得多种多样,其中既有各种前端设备(台式机.手机等),又有各种后端服务器,因此必须有一个统一的机制,方便各种服务使用者和开放服务平台进行通信.为了更好的实 ...

  6. Kafka - protocol

    http://kafka.apache.org/protocol   具体的协议看原文,   Preliminaries Network Kafka uses a binary protocol ov ...

  7. EntityFramework code first 一些常用的约束特性

    参阅: https://msdn.microsoft.com/zh-cn/data/jj591583 1. 主键 public class Test { //名称为 ID 的属性会自动映射为主键(自增 ...

  8. Jfianl

    http://www.oschina.net/question/257183_149268----------- 添加Handler: me.add(new ContextPathHandler(&q ...

  9. 检测中文长度gbk下2个字节

    //$str = 'fff&sdf你是sdf好fdf啊b歌hello中world';$str = 'd你b_fff是好啊歌中潺潺 ';echo chineselength($str).&quo ...

  10. centos 修改网卡名为eth0

    centos7和centos6的命名规则不同,centos6网卡名由udev控制 网卡名以eth开头然后第一块网卡叫eth0第二块网卡叫eth1,然后centos7的网卡命名规则截然不同 centos ...