dot-javascript_attributes: Prepare cookie attributes for javascript

.javascript_attributesR Documentation

Prepare cookie attributes for javascript

Description

Prepare cookie attributes for javascript

Usage

.javascript_attributes(expiration, secure_only, domain, path, same_site)

Arguments

expiration

Days after which the cookie should expire. To remove an HttpOnly cookie, send a negative value for this attribute.

secure_only

Logical indicating whether the cookie should only be accessible via secure (⁠https:⁠) requests (except on localhost).

domain

The host to which the cookie will be sent (including subdomains). If this is NULL (default) the cookie will only be sent to the host of the page where this cookie was set (not including subdomains).

path

The path that must exist in the requested URL for the browser to send this cookie. Includes subdirectories.

same_site

One of "strict", "lax" (default), or "none", indicating when the cookie should be sent. When same_site = "none", secure_only must be TRUE.

Value

A list of attributes with the names expected by js-cookie.


cookies documentation built on Oct. 3, 2023, 1:07 a.m.