puppeteer/website/versioned_docs/version-22.8.1/api/puppeteer.cookie.md
release-please[bot] 042d61030c
chore: release main (#12415)
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2024-05-13 08:49:32 +00:00

2.8 KiB

sidebar_label
Cookie

Cookie interface

Represents a cookie object.

Signature:

export interface Cookie

Properties

Property

Modifiers

Type

Description

Default

domain

string

Cookie domain.

expires

number

Cookie expiration date as the number of seconds since the UNIX epoch. Set to -1 for session cookies

httpOnly

boolean

True if cookie is http-only.

name

string

Cookie name.

partitionKey

optional

string

Cookie partition key. The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie. Supported only in Chrome.

partitionKeyOpaque

optional

boolean

True if cookie partition key is opaque. Supported only in Chrome.

path

string

Cookie path.

priority

optional

CookiePriority

Cookie Priority. Supported only in Chrome.

sameParty

optional

boolean

True if cookie is SameParty. Supported only in Chrome.

sameSite

optional

CookieSameSite

Cookie SameSite type.

secure

boolean

True if cookie is secure.

session

boolean

True in case of session cookie.

size

number

Cookie size.

sourceScheme

optional

CookieSourceScheme

Cookie source scheme type. Supported only in Chrome.

value

string

Cookie value.