2024-02-02 12:13:00 +00:00
---
sidebar_label: Cookie
---
# Cookie interface
Represents a cookie object.
#### Signature:
```typescript
export interface Cookie
```
## Properties
2024-03-20 15:03:14 +00:00
< table > < thead > < tr > < th >
Property
< / th > < th >
Modifiers
< / th > < th >
Type
< / th > < th >
Description
< / th > < th >
Default
< / th > < / tr > < / thead >
< tbody > < tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "domain" > domain< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
< / td > < td >
string
< / td > < td >
Cookie domain.
< / td > < td >
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "expires" > expires< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
< / td > < td >
number
< / td > < td >
Cookie expiration date as the number of seconds since the UNIX epoch. Set to `-1` for session cookies
< / td > < td >
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "httponly" > httpOnly< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
< / td > < td >
boolean
< / td > < td >
True if cookie is http-only.
< / td > < td >
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "name" > name< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
< / td > < td >
string
< / td > < td >
Cookie name.
< / td > < td >
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "partitionkey" > partitionKey< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
`optional`
< / td > < td >
string
< / td > < td >
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.
< / td > < td >
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "partitionkeyopaque" > partitionKeyOpaque< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
`optional`
< / td > < td >
boolean
< / td > < td >
True if cookie partition key is opaque. Supported only in Chrome.
< / td > < td >
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "path" > path< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
< / td > < td >
string
< / td > < td >
Cookie path.
< / td > < td >
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "priority" > priority< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
`optional`
< / td > < td >
[CookiePriority ](./puppeteer.cookiepriority.md )
< / td > < td >
Cookie Priority. Supported only in Chrome.
< / td > < td >
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "sameparty" > sameParty< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
`optional`
< / td > < td >
boolean
< / td > < td >
True if cookie is SameParty. Supported only in Chrome.
< / td > < td >
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "samesite" > sameSite< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
`optional`
< / td > < td >
[CookieSameSite ](./puppeteer.cookiesamesite.md )
< / td > < td >
Cookie SameSite type.
< / td > < td >
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "secure" > secure< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
< / td > < td >
boolean
< / td > < td >
True if cookie is secure.
< / td > < td >
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "session" > session< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
< / td > < td >
boolean
< / td > < td >
True in case of session cookie.
< / td > < td >
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "size" > size< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
< / td > < td >
number
< / td > < td >
Cookie size.
< / td > < td >
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "sourcescheme" > sourceScheme< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
`optional`
< / td > < td >
[CookieSourceScheme ](./puppeteer.cookiesourcescheme.md )
< / td > < td >
Cookie source scheme type. Supported only in Chrome.
< / td > < td >
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "value" > value< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
< / td > < td >
string
< / td > < td >
Cookie value.
< / td > < td >
< / td > < / tr >
< / tbody > < / table >