cookie | R Documentation |
Create a cookie object.
cookie(
name,
value,
expires = NULL,
max_age = NULL,
domain = NULL,
path = NULL,
secure = TRUE,
http_only = TRUE,
same_site = NULL
)
name |
Name of the cookie. |
value |
value of the cookie. |
expires |
Expiry, if an integer assumes it's the number of seconds
from now. Otherwise accepts an object of class |
max_age |
Indicates the number of seconds until the cookie expires.
A zero or negative number will expire the cookie immediately.
If both |
domain |
Defines the host to which the cookie will be sent. If omitted, this attribute defaults to the host of the current document URL, not including subdomains. |
path |
Indicates the path that must exist in the requested URL for the browser to send the Cookie header. |
secure |
Indicates that the cookie is sent to the server only when a request is made with the https: scheme (except on localhost), and therefore, is more resistant to man-in-the-middle attacks. |
http_only |
Forbids JavaScript from accessing the cookie, for example, through the document.cookie property. |
same_site |
Controls whether or not a cookie is sent with cross-origin
requests, providing some protection against cross-site request forgery
attacks (CSRF). Accepts |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.