Represents information about an HTTP cookie.

interface Cookie {
    domain: string;
    expirationDate?: number;
    firstPartyDomain: string;
    hostOnly: boolean;
    httpOnly: boolean;
    name: string;
    partitionKey?: PartitionKey;
    path: string;
    sameSite: SameSiteStatus;
    secure: boolean;
    session: boolean;
    storeId: string;
    value: string;
}
Index
domain: string

The domain of the cookie (e.g. "www.google.com", "example.com").

expirationDate?: number

The expiration date of the cookie as the number of seconds since the UNIX epoch. Not provided for session cookies.

firstPartyDomain: string

The first-party domain of the cookie.

hostOnly: boolean

True if the cookie is a host-only cookie (i.e. a request's host must exactly match the domain of the cookie).

httpOnly: boolean

True if the cookie is marked as HttpOnly (i.e. the cookie is inaccessible to client-side scripts).

name: string

The name of the cookie.

partitionKey?: PartitionKey

The cookie's storage partition, if any. null if not partitioned.

path: string

The path of the cookie.

sameSite: SameSiteStatus

The cookie's same-site status (i.e. whether the cookie is sent with cross-site requests).

secure: boolean

True if the cookie is marked as Secure (i.e. its scope is limited to secure channels, typically HTTPS).

session: boolean

True if the cookie is a session cookie, as opposed to a persistent cookie with an expiration date.

storeId: string

The ID of the cookie store containing this cookie, as provided in getAllCookieStores().

value: string

The value of the cookie.