Options. Cookie

A record object describing a browser cookie.

Members

domain :string|undefined

The domain the cookie is visible to. Defaults to the current browsing context's document's URL when adding a cookie.

Type:
  • string | undefined

expiry :Date|number|undefined

When the cookie expires.

When adding a cookie, this may be specified as a Date object, or in seconds since Unix epoch (January 1, 1970).

The expiry is always returned in seconds since epoch when retrieving cookies from the browser.

Type:
  • Date | number | undefined

httpOnly :boolean|undefined

Whether the cookie is an HTTP only cookie. Defaults to false when adding a new cookie.

Type:
  • boolean | undefined

name :string

The name of the cookie.

Type:
  • string

path :string|undefined

The cookie path. Defaults to "/" when adding a cookie.

Type:
  • string | undefined

sameSite :string|undefined

When the cookie applies to a SameSite policy.

When adding a cookie, this may be specified as a string object which is one of 'Lax', 'Strict' or 'None'.

Type:
  • string | undefined

secure :boolean|undefined

Whether the cookie is a secure cookie. Defaults to false when adding a new cookie.

Type:
  • boolean | undefined

value :string

The cookie value.

Type:
  • string