Optional
domainSpecifies the value for the Set-Cookie attribute. By default, no domain is set, and most clients will consider the cookie to apply to only the current domain.
Optional
expiresA number of milliseconds or Date interface containing the expires of the cookie.
A string with the name of a cookie.
Optional
pathSpecifies the value for the Set-Cookie
attribute.
By default, the path is considered the "default path".
Optional
sameSpecifies the boolean or string to be the value for the Set-Cookie
attribute.
true
will set the SameSite
attribute to Strict
for strict same
site enforcement.false
will not set the SameSite
attribute.'lax'
will set the SameSite
attribute to Lax for lax same site
enforcement.'strict'
will set the SameSite
attribute to Strict for strict same
site enforcement.'none'
will set the SameSite attribute to None for an explicit
cross-site cookie.More information about the different enforcement levels can be found in specification.
note This is an attribute that has not yet been fully standardized, and may change in the future. This also means many clients may ignore this attribute until they understand it.
Optional
secureSpecifies the boolean value for the Set-Cookie
attribute. When truthy, the
Secure
attribute is set, otherwise it is not. By default, the Secure
attribute is not set.
Note be careful when setting this to true
, as compliant clients will
not send the cookie back to the server in the future if the browser does
not have an HTTPS connection.
A string containing the value of the cookie.
CookieListItem as specified by W3C.