Boxever.setCookie(cookieName, cookieValue[, expiresIn])
The setCookie()
function creates a cookie in the browser.
Parameters
Parameter |
Type |
Description |
Note |
---|---|---|---|
|
string or number |
The name of the cookie. |
N/A |
|
string |
The value of the cookie. |
N/A |
optional |
integer |
The number of days before the cookie expires. If you do not specify this value, the cookie becomes a session cookie. |
For example, set the value to |
Return value
undefined
Example
Create a cookie in the browser that expires in 1 day: