HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

cookie

Description

The cookie of Document for JS returns the HTTP cookies that apply to the Document. If there are no cookies or cookies can't be applied to this resource, the empty string will be returned.

Can be set, to add a new cookie to the element's set of HTTP cookies.

If the contents are sandboxed into an opaque origin (e.g., in an iframe with the sandbox attribute), a "SecurityError" DOMException will be thrown on getting and setting.

Syntax

document.cookie [ = value ]

Examples

1 · get

2 · set