<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://fileformats.archiveteam.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://fileformats.archiveteam.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=KlfJoat</id>
		<title>Just Solve the File Format Problem - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://fileformats.archiveteam.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=KlfJoat"/>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/wiki/Special:Contributions/KlfJoat"/>
		<updated>2026-04-29T05:04:40Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.19.2</generator>

	<entry>
		<id>http://fileformats.archiveteam.org/wiki/Netscape_cookies.txt</id>
		<title>Netscape cookies.txt</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/wiki/Netscape_cookies.txt"/>
				<updated>2022-12-08T23:37:10Z</updated>
		
		<summary type="html">&lt;p&gt;KlfJoat: Add to .txt category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FormatInfo&lt;br /&gt;
|formattype=electronic&lt;br /&gt;
|subcat=Web&lt;br /&gt;
|subcat2=Web browser files&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the past, the Netscape browser was so dominant that many tools emulated its cookie file format. The browser market moved on, but the &amp;lt;code&amp;gt;'''cookies.txt'''&amp;lt;/code&amp;gt; file format remains in use by fundamental and popular tools such as [https://curl.se/ curl], [https://www.gnu.org/software/wget/ wget], and [https://youtube-dl.org/ youtube-dl], as well as many others.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
Officially, the first line of the file must be one of the following:&lt;br /&gt;
* &amp;lt;code&amp;gt;# HTTP Cookie File&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;# Netscape HTTP Cookie File&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fields are [[Tab delimited|separated by tab characters]] (&amp;lt;code&amp;gt;\t&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;\009&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0x09&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Lines are separated by the newline format in use by the running operating system. That means &amp;lt;code&amp;gt;CRLF&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;\r\n&amp;lt;/code&amp;gt;) for Windows and &amp;lt;code&amp;gt;LF&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;) for Unix-like systems such as Linux, macOS, FreeBSD, etc.&lt;br /&gt;
&lt;br /&gt;
The 7 fields are as follows.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: 0px; margin-right: auto;&amp;quot; &lt;br /&gt;
|+ Human-Friendly Schema&lt;br /&gt;
|-&lt;br /&gt;
! Field Name !! Type !! Example Value || Notes&lt;br /&gt;
|-&lt;br /&gt;
| host || string || &amp;lt;code&amp;gt;example.com&amp;lt;/code&amp;gt; || Hostname that owns the cookie&lt;br /&gt;
|-&lt;br /&gt;
| subdomains || boolean string || &amp;lt;code&amp;gt;FALSE&amp;lt;/code&amp;gt; || Include subdomains (old attempt at SameSite)&lt;br /&gt;
|-&lt;br /&gt;
| path || string || &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; || Pathname that owns the cookie at the host&lt;br /&gt;
|-&lt;br /&gt;
| isSecure || boolean string || &amp;lt;code&amp;gt;TRUE&amp;lt;/code&amp;gt; || Send/receive cookie over HTTPS only.&lt;br /&gt;
|-&lt;br /&gt;
| expiry || number || &amp;lt;code&amp;gt;1663611142&amp;lt;/code&amp;gt; || Cookie expiration in standard [[Unix time|Unix timestamp]] format&lt;br /&gt;
|-&lt;br /&gt;
| name || string || &amp;lt;code&amp;gt;cookiename&amp;lt;/code&amp;gt; || Cookie name&lt;br /&gt;
|-&lt;br /&gt;
| value || string || &amp;lt;code&amp;gt;cookievalue&amp;lt;/code&amp;gt; || Cookie value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example file ==&lt;br /&gt;
 # HTTP Cookie File&lt;br /&gt;
 example.com	FALSE	/	TRUE	1663611142	cookiename	cookievalue&lt;br /&gt;
 example.net	FALSE	/	FALSE	1125326700	cookiename	cookievalue&lt;br /&gt;
 example.org	TRUE	/	FALSE	1000210440	cookiename	cookievalue&lt;br /&gt;
 example.com	FALSE	/a/	FALSE	1596693600	cookiename	cookievalue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Extract cookies to Netscape cookies.txt format ==&lt;br /&gt;
This is a common need so extensions exist for Chrome and Firefox.&lt;br /&gt;
* [https://chrome.google.com/webstore/detail/get-cookiestxt/bgaddhkoddajcdgocldbbfleckgcbcid/ Chrome - Get cookies.txt]&lt;br /&gt;
* [https://addons.mozilla.org/en-US/firefox/addon/cookies-txt/ Firefox - cookies.txt]&lt;br /&gt;
&lt;br /&gt;
=== Code snippet to extract cookies from Mozilla Firefox to Netscape cookies.txt format ===&lt;br /&gt;
It may be useful to extract your own cookies by running a script. This is a small excerpt of a larger script, so it will not run alone as-is. This portion will take a [[Firefox cookie database]], convert it to cookies.txt format, then echo it to &amp;lt;code&amp;gt;stdout&amp;lt;/code&amp;gt;. The work before this snippet plus capturing the output are beyond the scope of this page.&lt;br /&gt;
&lt;br /&gt;
Because of format changes, some data type conversions must be performed during the extract. This is done in the &amp;lt;code&amp;gt;case&amp;lt;/code&amp;gt; statements.&lt;br /&gt;
&lt;br /&gt;
'''This snippet of code is not compatible with the Multi-Account Container Extension or the Facebook Container Extension. Multiple cookies that match the same host/path/name tuple might be output. Depending on the website and the way the cookies.txt file is parsed by the tool you're using, you may find inconsistent, unexpected, or contradictory behavior.'''&lt;br /&gt;
&lt;br /&gt;
Prerequisites:  &lt;br /&gt;
* A Bourne-compatible shell with support for [https://en.wikipedia.org/wiki/Here_document here documents], such as &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;csh&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tcsh&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ksh&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;zsh&amp;lt;/code&amp;gt; to name a few.&lt;br /&gt;
* The sqlite3 binary.&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;# HTTP Cookie File&amp;quot;&lt;br /&gt;
 sqlite3 -separator '	' &amp;quot;cookies.sqlite&amp;quot; &amp;lt;&amp;lt;- EOF&lt;br /&gt;
 .mode tabs&lt;br /&gt;
 .header off&lt;br /&gt;
 select host,&lt;br /&gt;
 case substr(host,1,1)='.' when 0 then 'FALSE' else 'TRUE' end,&lt;br /&gt;
 path,&lt;br /&gt;
 case isSecure when 0 then 'FALSE' else 'TRUE' end,&lt;br /&gt;
 expiry,&lt;br /&gt;
 name,&lt;br /&gt;
 value&lt;br /&gt;
 from moz_cookies;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
Firefox locks the &amp;lt;code&amp;gt;cookies.sqlite&amp;lt;/code&amp;gt; file while running. If you want to run the above script you must either exit Firefox or copy the file to a temporary location.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* The [https://github.com/yt-dlp/yt-dlp yt-dlp] project supports pulling cookies from the browser natively with &amp;lt;code&amp;gt;--cookies-from-browser&amp;lt;/code&amp;gt; as well as the legacy cookies.txt format.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [https://everything.curl.dev/http/cookies/fileformat cURL cookie file format]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Text-based data]]&lt;br /&gt;
[[Category:File formats with a distinctive filename]]&lt;br /&gt;
[[Category:File formats with extension .txt]]&lt;/div&gt;</summary>
		<author><name>KlfJoat</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/wiki/Firefox_cookie_database</id>
		<title>Firefox cookie database</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/wiki/Firefox_cookie_database"/>
				<updated>2022-10-05T17:31:42Z</updated>
		
		<summary type="html">&lt;p&gt;KlfJoat: Links, brackets, and parentheses.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FormatInfo&lt;br /&gt;
|formattype=electronic&lt;br /&gt;
|subcat=Web&lt;br /&gt;
|subcat2=Web browser files&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Cookies in Firefox are stored in an [[SQLite]] format database found in the file '''cookies.sqlite''' in the currently-active user profile directory (exact path is system-dependent). Also, the write-ahead-logging and shared-memory files '''cookies.sqlite-wal''' and '''cookies.sqlite-shm''' are used, but the latter two are re-integrated into the main database file and deleted when you close the browser.&lt;br /&gt;
&lt;br /&gt;
The structure is seen in this SQL command embedded in the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, name TEXT, value TEXT, host TEXT, path TEXT, expiry INTEGER, lastAccessed INTEGER, isSecure INTEGER, isHttpOnly INTEGER, baseDomain TEXT, creationTime INTEGER)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox Contextual Identity Project (Containers) ==&lt;br /&gt;
Firefox has implemented OriginAttributes in internal APIs to support features like [https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/ Multi-Account Containers]. Based on that, the same cookie name at the same host on the same path may return multiple values due to different originAttributes values (representing different containers).&lt;br /&gt;
&lt;br /&gt;
As of Firefox 104 (released 2022-08-23), the '''cookies.sqlite''' schema is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, originAttributes TEXT NOT NULL DEFAULT '', name TEXT, value TEXT, host TEXT, path TEXT, expiry INTEGER, lastAccessed INTEGER, creationTime INTEGER, isSecure INTEGER, isHttpOnly INTEGER, inBrowserElement INTEGER DEFAULT 0, sameSite INTEGER DEFAULT 0, rawSameSite INTEGER DEFAULT 0, schemeMap INTEGER DEFAULT 0, CONSTRAINT moz_uniqueid UNIQUE (name, host, path, originAttributes))&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: 0px; margin-right: auto;&amp;quot; &lt;br /&gt;
|+ Human-Friendly Schema&lt;br /&gt;
|-&lt;br /&gt;
! Field Name !! Type !! Schema !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;PRIMARY KEY&amp;lt;/code&amp;gt; || SQLite unique row ID&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;originAttributes&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;NOT NULL DEFAULT ''&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || Values mapped to containers in &amp;lt;code&amp;gt;conatiners.json&amp;lt;/code&amp;gt;. Some containers, like the one for extensions (&amp;lt;code&amp;gt;userContextIdInternal.webextStorageLocal&amp;lt;/code&amp;gt;), will always exist even if the Multi-Account Container or Firefox Container extensions are not installed.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || || Cookie name&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || || Cookie value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;host&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || || Hostname that owns the cookie&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;path&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || || Pathname that owns the cookie at the host&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;expiry&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Cookie expiration in standard [[Unix time|Unix timestamp]] format&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;lastAccessed&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Cookie last accessed time in microseconds since the [[Unix time|Unix epoch]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;creationTime&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Cookie creation time in microseconds since the [[Unix time|Unix epoch]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isSecure&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Send/receive cookie over HTTPS only. Set in Set-Cookie header&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isHttpOnly&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Access to the cookie via client-side script is prevented. Set in Set-Cookie header&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;inBrowserElement&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;DEFAULT 0&amp;lt;/code&amp;gt; || [https://bugzilla.mozilla.org/show_bug.cgi?id=756648#c11 Legacy Firefox OS setting to create &amp;quot;cookie jars&amp;quot;]&lt;br /&gt;
|-&lt;br /&gt;
| [https://web.dev/samesite-cookies-explained/#explicitly-state-cookie-usage-with-the-samesite-attribute &amp;lt;code&amp;gt;sameSite&amp;lt;/code&amp;gt;] || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;DEFAULT 0&amp;lt;/code&amp;gt; || Cookies should only be readable by the same site that set them. Set in Set-Cookie header&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rawSameSite&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;DEFAULT 0&amp;lt;/code&amp;gt; || [https://bugzilla.mozilla.org/show_bug.cgi?id=1551798#c19 &amp;quot;Preserve the 'on the wire' value (of the SameSite cookie), meaning the value found in the Set-Cookie header&amp;quot;]&lt;br /&gt;
|-&lt;br /&gt;
| [https://web.dev/schemeful-samesite/ &amp;lt;code&amp;gt;schemeMap&amp;lt;/code&amp;gt;] || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;DEFAULT 0&amp;lt;/code&amp;gt; || [https://bugzilla.mozilla.org/show_bug.cgi?id=1638358#c0 Consider different &amp;quot;schemes&amp;quot; (meaning http vs https) to be different sites] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The '''&amp;lt;code&amp;gt;CONSTRAINT&amp;lt;/code&amp;gt;''' clause makes SQLite require the quadruple of &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;host&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;path&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;originAttributes&amp;lt;/code&amp;gt; to be unique.&lt;br /&gt;
&lt;br /&gt;
== Datetime formats ==&lt;br /&gt;
There are 3 dateime fields: '''expiry''', '''lastAccessed''', and '''creationTime'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;expiry&amp;lt;/code&amp;gt; is stored in standard [[Unix time|Unix timestamp]] format. In SQLite, this can be converted to a human-readable format with &amp;lt;code&amp;gt;datetime(&amp;quot;expiry&amp;quot;, 'unixepoch')&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
However, &amp;lt;code&amp;gt;lastAccessed&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;creationTime&amp;lt;/code&amp;gt; are in microseconds since the [[Unix time|Unix epoch]]. To convert to a human-readable format in SQLite use &amp;lt;code&amp;gt;datetime((&amp;quot;creationTime&amp;quot;/1000000),'unixepoch')&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://news.cnet.com/8301-1023_3-57591052-93/ad-group-blasts-cookie-privacy-project-from-mozilla-stanford/ Ad group blasts cookie-privacy project from Mozilla, Stanford]&lt;br /&gt;
* [http://blogs.computerworlduk.com/open-enterprise/2013/08/did-you-know-that-mozilla-is-hijacking-the-internet/index.htm Commentary on Digital Advertising Alliance's criticism of Mozilla]&lt;br /&gt;
* [https://addons.mozilla.org/en-US/firefox/addon/self-destructing-cookies/ Self-destructing cookie plugin: removes cookies when you close a tab]&lt;br /&gt;
* [https://www.i-dont-care-about-cookies.eu/ Plugin to get rid of cookie warnings]&lt;br /&gt;
* [https://wiki.mozilla.org/Security/Contextual_Identity_Project/Containers Mozilla Wiki - Security/Contextual Identity Project/Containers]&lt;br /&gt;
&lt;br /&gt;
[[Category:SQLite based file formats]]&lt;br /&gt;
[[Category:Mozilla]]&lt;/div&gt;</summary>
		<author><name>KlfJoat</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/wiki/Firefox_cookie_database</id>
		<title>Firefox cookie database</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/wiki/Firefox_cookie_database"/>
				<updated>2022-09-20T00:22:46Z</updated>
		
		<summary type="html">&lt;p&gt;KlfJoat: fix hyperlink&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FormatInfo&lt;br /&gt;
|formattype=electronic&lt;br /&gt;
|subcat=Web&lt;br /&gt;
|subcat2=Web browser files&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Cookies in Firefox are stored in an [[SQLite]] format database found in the file '''cookies.sqlite''' in the currently-active user profile directory (exact path is system-dependent). Also, the write-ahead-logging and shared-memory files '''cookies.sqlite-wal''' and '''cookies.sqlite-shm''' are used, but the latter two are re-integrated into the main database file and deleted when you close the browser.&lt;br /&gt;
&lt;br /&gt;
The structure is seen in this SQL command embedded in the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, name TEXT, value TEXT, host TEXT, path TEXT, expiry INTEGER, lastAccessed INTEGER, isSecure INTEGER, isHttpOnly INTEGER, baseDomain TEXT, creationTime INTEGER)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox Contextual Identity Project (Containers) ==&lt;br /&gt;
Firefox has implemented OriginAttributes in internal APIs to support features like [https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/ Multi-Account Containers]. Based on that, the same cookie name at the same host on the same path may return multiple values due to different originAttributes values (representing different containers).&lt;br /&gt;
&lt;br /&gt;
As of Firefox 104 (released 2022-08-23), the '''cookies.sqlite''' schema is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, originAttributes TEXT NOT NULL DEFAULT '', name TEXT, value TEXT, host TEXT, path TEXT, expiry INTEGER, lastAccessed INTEGER, creationTime INTEGER, isSecure INTEGER, isHttpOnly INTEGER, inBrowserElement INTEGER DEFAULT 0, sameSite INTEGER DEFAULT 0, rawSameSite INTEGER DEFAULT 0, schemeMap INTEGER DEFAULT 0, CONSTRAINT moz_uniqueid UNIQUE (name, host, path, originAttributes))&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: 0px; margin-right: auto;&amp;quot; &lt;br /&gt;
|+ Human-Friendly Schema&lt;br /&gt;
|-&lt;br /&gt;
! Field Name !! Type !! Schema !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;PRIMARY KEY&amp;lt;/code&amp;gt; || SQLite unique row ID&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;originAttributes&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;NOT NULL DEFAULT ''&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || Values mapped to containers in &amp;lt;code&amp;gt;conatiners.json&amp;lt;/code&amp;gt;. Some containers, like the one for extensions (&amp;lt;code&amp;gt;userContextIdInternal.webextStorageLocal&amp;lt;/code&amp;gt;), will always exist even if the Multi-Account Container or Firefox Container extensions are not installed.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || || Cookie name&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || || Cookie value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;host&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || || Hostname that owns the cookie&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;path&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || || Pathname that owns the cookie at the host&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;expiry&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Cookie expiration in standard [[Unix time|Unix timestamp]] format&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;lastAccessed&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Cookie last accessed time in microseconds since the [[Unix time|Unix epoch]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;creationTime&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Cookie creation time in microseconds since the [[Unix time|Unix epoch]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isSecure&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Send/receive cookie over HTTPS only. Set in Set-Cookie header&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isHttpOnly&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Access to the cookie via client-side script is prevented. Set in Set-Cookie header&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;inBrowserElement&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;DEFAULT 0&amp;lt;/code&amp;gt; || [https://bugzilla.mozilla.org/show_bug.cgi?id=756648#c11 Legacy Firefox OS setting to create &amp;quot;cookie jars&amp;quot;]&lt;br /&gt;
|-&lt;br /&gt;
| [https://web.dev/samesite-cookies-explained/#explicitly-state-cookie-usage-with-the-samesite-attribute &amp;lt;code&amp;gt;sameSite&amp;lt;/code&amp;gt;] || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;DEFAULT 0&amp;lt;/code&amp;gt; || Cookies should only be readable by the same site that set them. Set in Set-Cookie header&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rawSameSite&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;DEFAULT 0&amp;lt;/code&amp;gt; || [https://bugzilla.mozilla.org/show_bug.cgi?id=1551798#c19 &amp;quot;Preserve the 'on the wire' value [of the SameSite cookie, meaning] the value found in the Set-Cookie header&amp;quot;]&lt;br /&gt;
|-&lt;br /&gt;
| [https://web.dev/schemeful-samesite/ &amp;lt;code&amp;gt;schemeMap&amp;lt;/code&amp;gt;] || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;DEFAULT 0&amp;lt;/code&amp;gt; || [https://bugzilla.mozilla.org/show_bug.cgi?id=1638358#c0 Consider different &amp;quot;schemes&amp;quot; (meaning http vs https) to be different sites] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The '''&amp;lt;code&amp;gt;CONSTRAINT&amp;lt;/code&amp;gt;''' clause makes SQLite require the quadruple of &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;host&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;path&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;originAttributes&amp;lt;/code&amp;gt; to be unique.&lt;br /&gt;
&lt;br /&gt;
== Datetime formats ==&lt;br /&gt;
There are 3 dateime fields: '''expiry''', '''lastAccessed''', and '''creationTime'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;expiry&amp;lt;/code&amp;gt; is stored in standard [[Unix time|Unix timestamp]] format. In SQLite, this can be converted to a human-readable format with &amp;lt;code&amp;gt;datetime(&amp;quot;expiry&amp;quot;, 'unixepoch')&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
However, &amp;lt;code&amp;gt;lastAccessed&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;creationTime&amp;lt;/code&amp;gt; are in microseconds since the [[Unix time|Unix epoch]]. To convert to a human-readable format in SQLite use &amp;lt;code&amp;gt;datetime((&amp;quot;creationTime&amp;quot;/1000000),'unixepoch')&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://news.cnet.com/8301-1023_3-57591052-93/ad-group-blasts-cookie-privacy-project-from-mozilla-stanford/ Ad group blasts cookie-privacy project from Mozilla, Stanford]&lt;br /&gt;
* [http://blogs.computerworlduk.com/open-enterprise/2013/08/did-you-know-that-mozilla-is-hijacking-the-internet/index.htm Commentary on Digital Advertising Alliance's criticism of Mozilla]&lt;br /&gt;
* [https://addons.mozilla.org/en-US/firefox/addon/self-destructing-cookies/ Self-destructing cookie plugin: removes cookies when you close a tab]&lt;br /&gt;
* [https://www.i-dont-care-about-cookies.eu/ Plugin to get rid of cookie warnings]&lt;br /&gt;
* [https://wiki.mozilla.org/Security/Contextual_Identity_Project/Containers Mozilla Wiki - Security/Contextual Identity Project/Containers]&lt;br /&gt;
&lt;br /&gt;
[[Category:SQLite based file formats]]&lt;br /&gt;
[[Category:Mozilla]]&lt;/div&gt;</summary>
		<author><name>KlfJoat</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/wiki/Firefox_cookie_database</id>
		<title>Firefox cookie database</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/wiki/Firefox_cookie_database"/>
				<updated>2022-09-19T22:57:28Z</updated>
		
		<summary type="html">&lt;p&gt;KlfJoat: Wording for path&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FormatInfo&lt;br /&gt;
|formattype=electronic&lt;br /&gt;
|subcat=Web&lt;br /&gt;
|subcat2=Web browser files&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Cookies in Firefox are stored in an [[SQLite]] format database found in the file '''cookies.sqlite''' in the currently-active user profile directory (exact path is system-dependent). Also, the write-ahead-logging and shared-memory files '''cookies.sqlite-wal''' and '''cookies.sqlite-shm''' are used, but the latter two are re-integrated into the main database file and deleted when you close the browser.&lt;br /&gt;
&lt;br /&gt;
The structure is seen in this SQL command embedded in the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, name TEXT, value TEXT, host TEXT, path TEXT, expiry INTEGER, lastAccessed INTEGER, isSecure INTEGER, isHttpOnly INTEGER, baseDomain TEXT, creationTime INTEGER)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox Contextual Identity Project (Containers) ==&lt;br /&gt;
Firefox has implemented OriginAttributes in internal APIs to support features like [https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/ Multi-Account Containers]. Based on that, the same cookie name at the same host on the same path may return multiple values due to different originAttributes values (representing different containers).&lt;br /&gt;
&lt;br /&gt;
As of Firefox 104 (released 2022-08-23), the '''cookies.sqlite''' schema is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, originAttributes TEXT NOT NULL DEFAULT '', name TEXT, value TEXT, host TEXT, path TEXT, expiry INTEGER, lastAccessed INTEGER, creationTime INTEGER, isSecure INTEGER, isHttpOnly INTEGER, inBrowserElement INTEGER DEFAULT 0, sameSite INTEGER DEFAULT 0, rawSameSite INTEGER DEFAULT 0, schemeMap INTEGER DEFAULT 0, CONSTRAINT moz_uniqueid UNIQUE (name, host, path, originAttributes))&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: 0px; margin-right: auto;&amp;quot; &lt;br /&gt;
|+ Human-Friendly Schema&lt;br /&gt;
|-&lt;br /&gt;
! Field Name !! Type !! Schema !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;PRIMARY KEY&amp;lt;/code&amp;gt; || SQLite unique row ID&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;originAttributes&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;NOT NULL DEFAULT ''&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || Values mapped to containers in &amp;lt;code&amp;gt;conatiners.json&amp;lt;/code&amp;gt;. Some containers, like the one for extensions (&amp;lt;code&amp;gt;userContextIdInternal.webextStorageLocal&amp;lt;/code&amp;gt;), will always exist even if the Multi-Account Container or Firefox Container extensions are not installed.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || || Cookie name&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || || Cookie value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;host&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || || Hostname that owns the cookie&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;path&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || || Pathname that owns the cookie at the host&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;expiry&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Cookie expiration in standard [[Unix time|Unix timestamp]] format&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;lastAccessed&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Cookie last accessed time in microseconds since the [[Unix time|Unix epoch]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;creationTime&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Cookie creation time in microseconds since the [[Unix time|Unix epoch]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isSecure&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Send/receive cookie over HTTPS only. Set in Set-Cookie header&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isHttpOnly&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Access to the cookie via client-side script is prevented. Set in Set-Cookie header&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;inBrowserElement&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;DEFAULT 0&amp;lt;/code&amp;gt; || [https://bugzilla.mozilla.org/show_bug.cgi?id=756648#c11 Legacy Firefox OS setting to create &amp;quot;cookie jars&amp;quot;]&lt;br /&gt;
|-&lt;br /&gt;
| [https://web.dev/samesite-cookies-explained/#explicitly-state-cookie-usage-with-the-samesite-attribute &amp;lt;code&amp;gt;sameSite&amp;lt;/code&amp;gt;] || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;DEFAULT 0&amp;lt;/code&amp;gt; || Cookies should only be readable by the same site that set them. Set in Set-Cookie header&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rawSameSite&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;DEFAULT 0&amp;lt;/code&amp;gt; || [https://bugzilla.mozilla.org/show_bug.cgi?id=1551798#c19 &amp;quot;Preserve the 'on the wire' value [of the SameSite cookie, meaning] the value found in the Set-Cookie header&amp;quot;]&lt;br /&gt;
|-&lt;br /&gt;
| [https://web.dev/schemeful-samesite/ &amp;lt;code&amp;gt;schemeMap&amp;lt;/code&amp;gt;] || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;DEFAULT 0&amp;lt;/code&amp;gt; || [https://bugzilla.mozilla.org/show_bug.cgi?id=1638358#c0 Consider different &amp;quot;schemes&amp;quot; (meaning http vs https) to be different sites &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The '''&amp;lt;code&amp;gt;CONSTRAINT&amp;lt;/code&amp;gt;''' clause makes SQLite require the quadruple of &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;host&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;path&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;originAttributes&amp;lt;/code&amp;gt; to be unique.&lt;br /&gt;
&lt;br /&gt;
== Datetime formats ==&lt;br /&gt;
There are 3 dateime fields: '''expiry''', '''lastAccessed''', and '''creationTime'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;expiry&amp;lt;/code&amp;gt; is stored in standard [[Unix time|Unix timestamp]] format. In SQLite, this can be converted to a human-readable format with &amp;lt;code&amp;gt;datetime(&amp;quot;expiry&amp;quot;, 'unixepoch')&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
However, &amp;lt;code&amp;gt;lastAccessed&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;creationTime&amp;lt;/code&amp;gt; are in microseconds since the [[Unix time|Unix epoch]]. To convert to a human-readable format in SQLite use &amp;lt;code&amp;gt;datetime((&amp;quot;creationTime&amp;quot;/1000000),'unixepoch')&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://news.cnet.com/8301-1023_3-57591052-93/ad-group-blasts-cookie-privacy-project-from-mozilla-stanford/ Ad group blasts cookie-privacy project from Mozilla, Stanford]&lt;br /&gt;
* [http://blogs.computerworlduk.com/open-enterprise/2013/08/did-you-know-that-mozilla-is-hijacking-the-internet/index.htm Commentary on Digital Advertising Alliance's criticism of Mozilla]&lt;br /&gt;
* [https://addons.mozilla.org/en-US/firefox/addon/self-destructing-cookies/ Self-destructing cookie plugin: removes cookies when you close a tab]&lt;br /&gt;
* [https://www.i-dont-care-about-cookies.eu/ Plugin to get rid of cookie warnings]&lt;br /&gt;
* [https://wiki.mozilla.org/Security/Contextual_Identity_Project/Containers Mozilla Wiki - Security/Contextual Identity Project/Containers]&lt;br /&gt;
&lt;br /&gt;
[[Category:SQLite based file formats]]&lt;br /&gt;
[[Category:Mozilla]]&lt;/div&gt;</summary>
		<author><name>KlfJoat</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/wiki/Netscape_cookies.txt</id>
		<title>Netscape cookies.txt</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/wiki/Netscape_cookies.txt"/>
				<updated>2022-09-19T22:57:01Z</updated>
		
		<summary type="html">&lt;p&gt;KlfJoat: clarity on FF cookie file locking&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FormatInfo&lt;br /&gt;
|formattype=electronic&lt;br /&gt;
|subcat=Web&lt;br /&gt;
|subcat2=Web browser files&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the past, the Netscape browser was so dominant that many tools emulated its cookie file format. The browser market moved on, but the &amp;lt;code&amp;gt;'''cookies.txt'''&amp;lt;/code&amp;gt; file format remains in use by fundamental and popular tools such as [https://curl.se/ curl], [https://www.gnu.org/software/wget/ wget], and [https://youtube-dl.org/ youtube-dl], as well as many others.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
Officially, the first line of the file must be one of the following:&lt;br /&gt;
* &amp;lt;code&amp;gt;# HTTP Cookie File&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;# Netscape HTTP Cookie File&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fields are [[Tab delimited|separated by tab characters]] (&amp;lt;code&amp;gt;\t&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;\009&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0x09&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Lines are separated by the newline format in use by the running operating system. That means &amp;lt;code&amp;gt;CRLF&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;\r\n&amp;lt;/code&amp;gt;) for Windows and &amp;lt;code&amp;gt;LF&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;) for Unix-like systems such as Linux, macOS, FreeBSD, etc.&lt;br /&gt;
&lt;br /&gt;
The 7 fields are as follows.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: 0px; margin-right: auto;&amp;quot; &lt;br /&gt;
|+ Human-Friendly Schema&lt;br /&gt;
|-&lt;br /&gt;
! Field Name !! Type !! Example Value || Notes&lt;br /&gt;
|-&lt;br /&gt;
| host || string || &amp;lt;code&amp;gt;example.com&amp;lt;/code&amp;gt; || Hostname that owns the cookie&lt;br /&gt;
|-&lt;br /&gt;
| subdomains || boolean string || &amp;lt;code&amp;gt;FALSE&amp;lt;/code&amp;gt; || Include subdomains (old attempt at SameSite)&lt;br /&gt;
|-&lt;br /&gt;
| path || string || &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; || Pathname that owns the cookie at the host&lt;br /&gt;
|-&lt;br /&gt;
| isSecure || boolean string || &amp;lt;code&amp;gt;TRUE&amp;lt;/code&amp;gt; || Send/receive cookie over HTTPS only.&lt;br /&gt;
|-&lt;br /&gt;
| expiry || number || &amp;lt;code&amp;gt;1663611142&amp;lt;/code&amp;gt; || Cookie expiration in standard [[Unix time|Unix timestamp]] format&lt;br /&gt;
|-&lt;br /&gt;
| name || string || &amp;lt;code&amp;gt;cookiename&amp;lt;/code&amp;gt; || Cookie name&lt;br /&gt;
|-&lt;br /&gt;
| value || string || &amp;lt;code&amp;gt;cookievalue&amp;lt;/code&amp;gt; || Cookie value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example file ==&lt;br /&gt;
 # HTTP Cookie File&lt;br /&gt;
 example.com	FALSE	/	TRUE	1663611142	cookiename	cookievalue&lt;br /&gt;
 example.net	FALSE	/	FALSE	1125326700	cookiename	cookievalue&lt;br /&gt;
 example.org	TRUE	/	FALSE	1000210440	cookiename	cookievalue&lt;br /&gt;
 example.com	FALSE	/a/	FALSE	1596693600	cookiename	cookievalue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Extract cookies to Netscape cookies.txt format ==&lt;br /&gt;
This is a common need so extensions exist for Chrome and Firefox.&lt;br /&gt;
* [https://chrome.google.com/webstore/detail/get-cookiestxt/bgaddhkoddajcdgocldbbfleckgcbcid/ Chrome - Get cookies.txt]&lt;br /&gt;
* [https://addons.mozilla.org/en-US/firefox/addon/cookies-txt/ Firefox - cookies.txt]&lt;br /&gt;
&lt;br /&gt;
=== Code snippet to extract cookies from Mozilla Firefox to Netscape cookies.txt format ===&lt;br /&gt;
It may be useful to extract your own cookies by running a script. This is a small excerpt of a larger script, so it will not run alone as-is. This portion will take a [[Firefox cookie database]], convert it to cookies.txt format, then echo it to &amp;lt;code&amp;gt;stdout&amp;lt;/code&amp;gt;. The work before this snippet plus capturing the output are beyond the scope of this page.&lt;br /&gt;
&lt;br /&gt;
Because of format changes, some data type conversions must be performed during the extract. This is done in the &amp;lt;code&amp;gt;case&amp;lt;/code&amp;gt; statements.&lt;br /&gt;
&lt;br /&gt;
'''This snippet of code is not compatible with the Multi-Account Container Extension or the Facebook Container Extension. Multiple cookies that match the same host/path/name tuple might be output. Depending on the website and the way the cookies.txt file is parsed by the tool you're using, you may find inconsistent, unexpected, or contradictory behavior.'''&lt;br /&gt;
&lt;br /&gt;
Prerequisites:  &lt;br /&gt;
* A Bourne-compatible shell with support for [https://en.wikipedia.org/wiki/Here_document here documents], such as &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;csh&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tcsh&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ksh&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;zsh&amp;lt;/code&amp;gt; to name a few.&lt;br /&gt;
* The sqlite3 binary.&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;# HTTP Cookie File&amp;quot;&lt;br /&gt;
 sqlite3 -separator '	' &amp;quot;cookies.sqlite&amp;quot; &amp;lt;&amp;lt;- EOF&lt;br /&gt;
 .mode tabs&lt;br /&gt;
 .header off&lt;br /&gt;
 select host,&lt;br /&gt;
 case substr(host,1,1)='.' when 0 then 'FALSE' else 'TRUE' end,&lt;br /&gt;
 path,&lt;br /&gt;
 case isSecure when 0 then 'FALSE' else 'TRUE' end,&lt;br /&gt;
 expiry,&lt;br /&gt;
 name,&lt;br /&gt;
 value&lt;br /&gt;
 from moz_cookies;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
Firefox locks the &amp;lt;code&amp;gt;cookies.sqlite&amp;lt;/code&amp;gt; file while running. If you want to run the above script you must either exit Firefox or copy the file to a temporary location.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* The [https://github.com/yt-dlp/yt-dlp yt-dlp] project supports pulling cookies from the browser natively with &amp;lt;code&amp;gt;--cookies-from-browser&amp;lt;/code&amp;gt; as well as the legacy cookies.txt format.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [https://everything.curl.dev/http/cookies/fileformat cURL cookie file format]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Text-based data]]&lt;/div&gt;</summary>
		<author><name>KlfJoat</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/wiki/Netscape_cookies.txt</id>
		<title>Netscape cookies.txt</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/wiki/Netscape_cookies.txt"/>
				<updated>2022-09-19T22:55:22Z</updated>
		
		<summary type="html">&lt;p&gt;KlfJoat: Create page with basic info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FormatInfo&lt;br /&gt;
|formattype=electronic&lt;br /&gt;
|subcat=Web&lt;br /&gt;
|subcat2=Web browser files&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the past, the Netscape browser was so dominant that many tools emulated its cookie file format. The browser market moved on, but the &amp;lt;code&amp;gt;'''cookies.txt'''&amp;lt;/code&amp;gt; file format remains in use by fundamental and popular tools such as [https://curl.se/ curl], [https://www.gnu.org/software/wget/ wget], and [https://youtube-dl.org/ youtube-dl], as well as many others.&lt;br /&gt;
&lt;br /&gt;
== File format ==&lt;br /&gt;
Officially, the first line of the file must be one of the following:&lt;br /&gt;
* &amp;lt;code&amp;gt;# HTTP Cookie File&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;# Netscape HTTP Cookie File&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fields are [[Tab delimited|separated by tab characters]] (&amp;lt;code&amp;gt;\t&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;\009&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0x09&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Lines are separated by the newline format in use by the running operating system. That means &amp;lt;code&amp;gt;CRLF&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;\r\n&amp;lt;/code&amp;gt;) for Windows and &amp;lt;code&amp;gt;LF&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;) for Unix-like systems such as Linux, macOS, FreeBSD, etc.&lt;br /&gt;
&lt;br /&gt;
The 7 fields are as follows.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: 0px; margin-right: auto;&amp;quot; &lt;br /&gt;
|+ Human-Friendly Schema&lt;br /&gt;
|-&lt;br /&gt;
! Field Name !! Type !! Example Value || Notes&lt;br /&gt;
|-&lt;br /&gt;
| host || string || &amp;lt;code&amp;gt;example.com&amp;lt;/code&amp;gt; || Hostname that owns the cookie&lt;br /&gt;
|-&lt;br /&gt;
| subdomains || boolean string || &amp;lt;code&amp;gt;FALSE&amp;lt;/code&amp;gt; || Include subdomains (old attempt at SameSite)&lt;br /&gt;
|-&lt;br /&gt;
| path || string || &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; || Pathname that owns the cookie at the host&lt;br /&gt;
|-&lt;br /&gt;
| isSecure || boolean string || &amp;lt;code&amp;gt;TRUE&amp;lt;/code&amp;gt; || Send/receive cookie over HTTPS only.&lt;br /&gt;
|-&lt;br /&gt;
| expiry || number || &amp;lt;code&amp;gt;1663611142&amp;lt;/code&amp;gt; || Cookie expiration in standard [[Unix time|Unix timestamp]] format&lt;br /&gt;
|-&lt;br /&gt;
| name || string || &amp;lt;code&amp;gt;cookiename&amp;lt;/code&amp;gt; || Cookie name&lt;br /&gt;
|-&lt;br /&gt;
| value || string || &amp;lt;code&amp;gt;cookievalue&amp;lt;/code&amp;gt; || Cookie value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example file ==&lt;br /&gt;
 # HTTP Cookie File&lt;br /&gt;
 example.com	FALSE	/	TRUE	1663611142	cookiename	cookievalue&lt;br /&gt;
 example.net	FALSE	/	FALSE	1125326700	cookiename	cookievalue&lt;br /&gt;
 example.org	TRUE	/	FALSE	1000210440	cookiename	cookievalue&lt;br /&gt;
 example.com	FALSE	/a/	FALSE	1596693600	cookiename	cookievalue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Extract cookies to Netscape cookies.txt format ==&lt;br /&gt;
This is a common need so extensions exist for Chrome and Firefox.&lt;br /&gt;
* [https://chrome.google.com/webstore/detail/get-cookiestxt/bgaddhkoddajcdgocldbbfleckgcbcid/ Chrome - Get cookies.txt]&lt;br /&gt;
* [https://addons.mozilla.org/en-US/firefox/addon/cookies-txt/ Firefox - cookies.txt]&lt;br /&gt;
&lt;br /&gt;
=== Code snippet to extract cookies from Mozilla Firefox to Netscape cookies.txt format ===&lt;br /&gt;
It may be useful to extract your own cookies by running a script. This is a small excerpt of a larger script, so it will not run alone as-is. This portion will take a [[Firefox cookie database]], convert it to cookies.txt format, then echo it to &amp;lt;code&amp;gt;stdout&amp;lt;/code&amp;gt;. The work before this snippet plus capturing the output are beyond the scope of this page.&lt;br /&gt;
&lt;br /&gt;
Because of format changes, some data type conversions must be performed during the extract. This is done in the &amp;lt;code&amp;gt;case&amp;lt;/code&amp;gt; statements.&lt;br /&gt;
&lt;br /&gt;
'''This snippet of code is not compatible with the Multi-Account Container Extension or the Facebook Container Extension. Multiple cookies that match the same host/path/name tuple might be output. Depending on the website and the way the cookies.txt file is parsed by the tool you're using, you may find inconsistent, unexpected, or contradictory behavior.'''&lt;br /&gt;
&lt;br /&gt;
Prerequisites:  &lt;br /&gt;
* A Bourne-compatible shell with support for [https://en.wikipedia.org/wiki/Here_document here documents], such as &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;csh&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tcsh&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ksh&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;zsh&amp;lt;/code&amp;gt; to name a few.&lt;br /&gt;
* The sqlite3 binary.&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;# HTTP Cookie File&amp;quot;&lt;br /&gt;
 sqlite3 -separator '	' &amp;quot;cookies.sqlite&amp;quot; &amp;lt;&amp;lt;- EOF&lt;br /&gt;
 .mode tabs&lt;br /&gt;
 .header off&lt;br /&gt;
 select host,&lt;br /&gt;
 case substr(host,1,1)='.' when 0 then 'FALSE' else 'TRUE' end,&lt;br /&gt;
 path,&lt;br /&gt;
 case isSecure when 0 then 'FALSE' else 'TRUE' end,&lt;br /&gt;
 expiry,&lt;br /&gt;
 name,&lt;br /&gt;
 value&lt;br /&gt;
 from moz_cookies;&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
Firefox locks the &amp;lt;code&amp;gt;cookies.sqlite&amp;lt;/code&amp;gt; file. If you want to run the above script you must either exit Firefox or copy the file to a temporary location.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* The [https://github.com/yt-dlp/yt-dlp yt-dlp] project supports pulling cookies from the browser natively with &amp;lt;code&amp;gt;--cookies-from-browser&amp;lt;/code&amp;gt; as well as the legacy cookies.txt format.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [https://everything.curl.dev/http/cookies/fileformat cURL cookie file format]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Text-based data]]&lt;/div&gt;</summary>
		<author><name>KlfJoat</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/wiki/Web_browser_files</id>
		<title>Web browser files</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/wiki/Web_browser_files"/>
				<updated>2022-09-19T21:43:42Z</updated>
		
		<summary type="html">&lt;p&gt;KlfJoat: /* Cookies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FormatInfo&lt;br /&gt;
|formattype=electronic&lt;br /&gt;
|subcat=Web&lt;br /&gt;
|thiscat=Web browser files&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Web browsers save a number of files, including bookmarks (or favorites) of web pages you want to revisit, configuration settings, temporary caches, and cookies stored by the browser when sent from sites you visit. Some of these are kept as permanent settings, while others are temporary and go away eventually.&lt;br /&gt;
&lt;br /&gt;
== Bookmarks ==&lt;br /&gt;
&lt;br /&gt;
* [[AOL Personal Filing Cabinet]] (includes bookmarks/favorites as well as email)&lt;br /&gt;
* [[Chrome bookmarks]]&lt;br /&gt;
* [[Firefox bookmarks]]&lt;br /&gt;
* [[Internet Explorer favorites]]&lt;br /&gt;
* [[Lynx bookmarks]]&lt;br /&gt;
* [[Mosaic hotlists]]&lt;br /&gt;
* [[Netscape bookmarks]]&lt;br /&gt;
* [[Safari bookmarks]]&lt;br /&gt;
&lt;br /&gt;
== Caches and History files ==&lt;br /&gt;
&lt;br /&gt;
* [[Chrome disk cache]]&lt;br /&gt;
* [[Firefox history file]]&lt;br /&gt;
* [[History.db]]&lt;br /&gt;
* [[HistoryIndex.sk]]&lt;br /&gt;
* [[History.plist]]&lt;br /&gt;
* [[Internet Explorer history file]]&lt;br /&gt;
&lt;br /&gt;
== Configuration files ==&lt;br /&gt;
&lt;br /&gt;
== Cookies ==&lt;br /&gt;
* [[Firefox cookie database]]&lt;br /&gt;
* [[Netscape cookies.txt]]&lt;br /&gt;
* [[libwww-perl cookie_jar]]&lt;br /&gt;
* [[Safari cookies]]&lt;br /&gt;
&lt;br /&gt;
== Plug-ins and add-ons ==&lt;br /&gt;
* [[Google Toolbar Search History File]]&lt;br /&gt;
&lt;br /&gt;
== Save and archive files ==&lt;br /&gt;
* [[Konqueror web archive]]&lt;br /&gt;
* [[Webarchive (Safari)]]&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [https://panopticlick.eff.org/ How unique and trackable is your browser?]&lt;br /&gt;
* [http://www.youtube.com/watch?v=s4zpL4VBbuU&amp;amp;feature=youtu.be Chrome for Android remote debugging (video)]&lt;br /&gt;
* [https://github.com/lclevy/firepwd/blob/master/mozilla_pbe.pdf Mozilla Password Based Encryption]&lt;/div&gt;</summary>
		<author><name>KlfJoat</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/wiki/Firefox_cookie_database</id>
		<title>Firefox cookie database</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/wiki/Firefox_cookie_database"/>
				<updated>2022-09-19T21:41:57Z</updated>
		
		<summary type="html">&lt;p&gt;KlfJoat: Add info on current schema and multi-account containers, making it more human-readable than just a CREATE TABLE line by adding a table.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FormatInfo&lt;br /&gt;
|formattype=electronic&lt;br /&gt;
|subcat=Web&lt;br /&gt;
|subcat2=Web browser files&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Cookies in Firefox are stored in an [[SQLite]] format database found in the file '''cookies.sqlite''' in the currently-active user profile directory (exact path is system-dependent). Also, the write-ahead-logging and shared-memory files '''cookies.sqlite-wal''' and '''cookies.sqlite-shm''' are used, but the latter two are re-integrated into the main database file and deleted when you close the browser.&lt;br /&gt;
&lt;br /&gt;
The structure is seen in this SQL command embedded in the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, name TEXT, value TEXT, host TEXT, path TEXT, expiry INTEGER, lastAccessed INTEGER, isSecure INTEGER, isHttpOnly INTEGER, baseDomain TEXT, creationTime INTEGER)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Firefox Contextual Identity Project (Containers) ==&lt;br /&gt;
Firefox has implemented OriginAttributes in internal APIs to support features like [https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/ Multi-Account Containers]. Based on that, the same cookie name at the same host on the same path may return multiple values due to different originAttributes values (representing different containers).&lt;br /&gt;
&lt;br /&gt;
As of Firefox 104 (released 2022-08-23), the '''cookies.sqlite''' schema is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, originAttributes TEXT NOT NULL DEFAULT '', name TEXT, value TEXT, host TEXT, path TEXT, expiry INTEGER, lastAccessed INTEGER, creationTime INTEGER, isSecure INTEGER, isHttpOnly INTEGER, inBrowserElement INTEGER DEFAULT 0, sameSite INTEGER DEFAULT 0, rawSameSite INTEGER DEFAULT 0, schemeMap INTEGER DEFAULT 0, CONSTRAINT moz_uniqueid UNIQUE (name, host, path, originAttributes))&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: 0px; margin-right: auto;&amp;quot; &lt;br /&gt;
|+ Human-Friendly Schema&lt;br /&gt;
|-&lt;br /&gt;
! Field Name !! Type !! Schema !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;PRIMARY KEY&amp;lt;/code&amp;gt; || SQLite unique row ID&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;originAttributes&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;NOT NULL DEFAULT ''&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || Values mapped to containers in &amp;lt;code&amp;gt;conatiners.json&amp;lt;/code&amp;gt;. Some containers, like the one for extensions (&amp;lt;code&amp;gt;userContextIdInternal.webextStorageLocal&amp;lt;/code&amp;gt;), will always exist even if the Multi-Account Container or Firefox Container extensions are not installed.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || || Cookie name&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || || Cookie value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;host&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || || Hostname that owns the cookie&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;path&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;TEXT&amp;lt;/code&amp;gt; || || Pathname at that host that owns the cookie&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;expiry&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Cookie expiration in standard [[Unix time|Unix timestamp]] format&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;lastAccessed&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Cookie last accessed time in microseconds since the [[Unix time|Unix epoch]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;creationTime&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Cookie creation time in microseconds since the [[Unix time|Unix epoch]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isSecure&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Send/receive cookie over HTTPS only. Set in Set-Cookie header&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isHttpOnly&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || || Access to the cookie via client-side script is prevented. Set in Set-Cookie header&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;inBrowserElement&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;DEFAULT 0&amp;lt;/code&amp;gt; || [https://bugzilla.mozilla.org/show_bug.cgi?id=756648#c11 Legacy Firefox OS setting to create &amp;quot;cookie jars&amp;quot;]&lt;br /&gt;
|-&lt;br /&gt;
| [https://web.dev/samesite-cookies-explained/#explicitly-state-cookie-usage-with-the-samesite-attribute &amp;lt;code&amp;gt;sameSite&amp;lt;/code&amp;gt;] || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;DEFAULT 0&amp;lt;/code&amp;gt; || Cookies should only be readable by the same site that set them. Set in Set-Cookie header&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rawSameSite&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;DEFAULT 0&amp;lt;/code&amp;gt; || [https://bugzilla.mozilla.org/show_bug.cgi?id=1551798#c19 &amp;quot;Preserve the 'on the wire' value [of the SameSite cookie, meaning] the value found in the Set-Cookie header&amp;quot;]&lt;br /&gt;
|-&lt;br /&gt;
| [https://web.dev/schemeful-samesite/ &amp;lt;code&amp;gt;schemeMap&amp;lt;/code&amp;gt;] || &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;DEFAULT 0&amp;lt;/code&amp;gt; || [https://bugzilla.mozilla.org/show_bug.cgi?id=1638358#c0 Consider different &amp;quot;schemes&amp;quot; (meaning http vs https) to be different sites &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The '''&amp;lt;code&amp;gt;CONSTRAINT&amp;lt;/code&amp;gt;''' clause makes SQLite require the quadruple of &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;host&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;path&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;originAttributes&amp;lt;/code&amp;gt; to be unique.&lt;br /&gt;
&lt;br /&gt;
== Datetime formats ==&lt;br /&gt;
There are 3 dateime fields: '''expiry''', '''lastAccessed''', and '''creationTime'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;expiry&amp;lt;/code&amp;gt; is stored in standard [[Unix time|Unix timestamp]] format. In SQLite, this can be converted to a human-readable format with &amp;lt;code&amp;gt;datetime(&amp;quot;expiry&amp;quot;, 'unixepoch')&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
However, &amp;lt;code&amp;gt;lastAccessed&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;creationTime&amp;lt;/code&amp;gt; are in microseconds since the [[Unix time|Unix epoch]]. To convert to a human-readable format in SQLite use &amp;lt;code&amp;gt;datetime((&amp;quot;creationTime&amp;quot;/1000000),'unixepoch')&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://news.cnet.com/8301-1023_3-57591052-93/ad-group-blasts-cookie-privacy-project-from-mozilla-stanford/ Ad group blasts cookie-privacy project from Mozilla, Stanford]&lt;br /&gt;
* [http://blogs.computerworlduk.com/open-enterprise/2013/08/did-you-know-that-mozilla-is-hijacking-the-internet/index.htm Commentary on Digital Advertising Alliance's criticism of Mozilla]&lt;br /&gt;
* [https://addons.mozilla.org/en-US/firefox/addon/self-destructing-cookies/ Self-destructing cookie plugin: removes cookies when you close a tab]&lt;br /&gt;
* [https://www.i-dont-care-about-cookies.eu/ Plugin to get rid of cookie warnings]&lt;br /&gt;
* [https://wiki.mozilla.org/Security/Contextual_Identity_Project/Containers Mozilla Wiki - Security/Contextual Identity Project/Containers]&lt;br /&gt;
&lt;br /&gt;
[[Category:SQLite based file formats]]&lt;br /&gt;
[[Category:Mozilla]]&lt;/div&gt;</summary>
		<author><name>KlfJoat</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/wiki/Firefox_cookie_database</id>
		<title>Firefox cookie database</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/wiki/Firefox_cookie_database"/>
				<updated>2022-08-16T04:59:21Z</updated>
		
		<summary type="html">&lt;p&gt;KlfJoat: Expand with information on how datetime fields are formatted&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FormatInfo&lt;br /&gt;
|formattype=electronic&lt;br /&gt;
|subcat=Web&lt;br /&gt;
|subcat2=Web browser files&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Cookies in Firefox are stored in an [[SQLite]] format database found in the file '''cookies.sqlite''' in the currently-active user profile directory (exact path is system-dependent). Also, the write-ahead-logging and shared-memory files '''cookies.sqlite-wal''' and '''cookies.sqlite-shm''' are used, but the latter two are re-integrated into the main database file and deleted when you close the browser.&lt;br /&gt;
&lt;br /&gt;
The structure is seen in this SQL command embedded in the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, name TEXT, value TEXT, host TEXT, path TEXT, expiry INTEGER, lastAccessed INTEGER, isSecure INTEGER, isHttpOnly INTEGER, baseDomain TEXT, creationTime INTEGER)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Datetime formats ==&lt;br /&gt;
There are 3 dateime fields: '''expiry''', '''lastAccessed''', and '''creationTime'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;expiry&amp;lt;/code&amp;gt; is stored in standard [[Unix time|Unix timestamp]] format. In SQLite, this can be converted to a human-readable format with &amp;lt;code&amp;gt;datetime(&amp;quot;expiry&amp;quot;, 'unixepoch')&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
However, &amp;lt;code&amp;gt;lastAccessed&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;creationTime&amp;lt;/code&amp;gt; are in microseconds. To convert to a human-readable format in SQLite use &amp;lt;code&amp;gt;datetime((&amp;quot;creationTime&amp;quot;/1000000),'unixepoch')&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://news.cnet.com/8301-1023_3-57591052-93/ad-group-blasts-cookie-privacy-project-from-mozilla-stanford/ Ad group blasts cookie-privacy project from Mozilla, Stanford]&lt;br /&gt;
* [http://blogs.computerworlduk.com/open-enterprise/2013/08/did-you-know-that-mozilla-is-hijacking-the-internet/index.htm Commentary on Digital Advertising Alliance's criticism of Mozilla]&lt;br /&gt;
* [https://addons.mozilla.org/en-US/firefox/addon/self-destructing-cookies/ Self-destructing cookie plugin: removes cookies when you close a tab]&lt;br /&gt;
* [https://www.i-dont-care-about-cookies.eu/ Plugin to get rid of cookie warnings]&lt;br /&gt;
&lt;br /&gt;
[[Category:SQLite based file formats]]&lt;br /&gt;
[[Category:Mozilla]]&lt;/div&gt;</summary>
		<author><name>KlfJoat</name></author>	</entry>

	</feed>