Skip to main content
Version: 22.4.1

Cookie interface

Represents a cookie object.

Signature:

export interface Cookie

Properties

PropertyModifiersTypeDescriptionDefault
domainstringCookie domain.
expiresnumberCookie expiration date as the number of seconds since the UNIX epoch. Set to -1 for session cookies
httpOnlybooleanTrue if cookie is http-only.
namestringCookie name.
partitionKeyoptionalstringCookie 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.
partitionKeyOpaqueoptionalbooleanTrue if cookie partition key is opaque. Supported only in Chrome.
pathstringCookie path.
priorityoptionalCookiePriorityCookie Priority. Supported only in Chrome.
samePartyoptionalbooleanTrue if cookie is SameParty. Supported only in Chrome.
sameSiteoptionalCookieSameSiteCookie SameSite type.
securebooleanTrue if cookie is secure.
sessionbooleanTrue in case of session cookie.
sizenumberCookie size.
sourceSchemeoptionalCookieSourceSchemeCookie source scheme type. Supported only in Chrome.
valuestringCookie value.