hyTags
HomeHome Getting StartedGetting Started DocumentationDocumentation

cookie-new

Creates a new cookie with the specified properties
Parameter
Type
Description
name
string
The name of the cookie
value
string
The value of the cookie
expires
dateTime
The expiration date of the cookie
max-age
number
The maximum age of the cookie in seconds
path
string
The path for which the cookie is valid
secure
bool
Whether the cookie should only be sent over HTTPS
same-site
bool
Whether the cookie should be restricted to same-site requests
return
cookie
The newly created cookie