Skip to main content

JSON file cookie format

🔗 Original page — Source of this material


List of parameters

NameTypeDescription
domainstringCookie file domain (for example, www.google.com, example.com).
expirationDatedouble?Cookie expiration date. Calculated as the number of seconds since the start of the *Unix epoch (01.01.1970 00:00:00). If the value is missing or very low (<0.01), the cookie will be considered session-only session=true.
hostOnlybool?Reserved. Not used.
httpOnlybool?True if the cookie is marked as HttpOnly (i.e., the cookie is not accessible to client-side scripts). Default value is False.
namestringCookie file name
pathstringCookie file path
sameSitestringSameSite status for the cookie (i.e., whether the cookie is sent with cross-site requests). Values: lax, strict, unspecified. Default value is unspecified
securebool?True if the cookie is marked as secure (i.e., its scope is limited to secure channels, usually HTTPS). Default value is False.
sessionbool?Reserved. Not used. Set via the expirationDate parameter.
storeIdstringReserved. Not used.
valuestringCookie value.
idint?Reserved. Not used.

Export example

[
{
"domain": "some.host.io",
"expirationDate": -1.0,
"httpOnly": true,
"name": "cookie-name-1",
"path": "/",
"sameSite": "strict",
"secure": true,
"value": "cookie-value-1",
},
{
"domain": "some.host.io",
"expirationDate": 1672520400.0,
"httpOnly": true,
"name": "cookie-name-2",
"path": "/",
"sameSite": "Unspecified",
"secure": true,
"value": "cookie-value-2",
},
{
"domain": "some.host.io",
"expirationDate": 1704056400.0,
"httpOnly": false,
"name": "cookie-name-3",
"path": "/",
"sameSite": "Unspecified",
"secure": true,
"value": "cookie-value-3",
}
]