ForgeComponents
en

Components

j-Cookie

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20
  • singleton
  • uses localStorage
  • supports cancel operation (removes cookies, localStorage and redirects to about:blank)

Configuration

  • agree {String} a label for the agree button (default: OK)
  • cancel {String} a label for the cancel button (default: Cancel)
  • redirect {String} URL to redirect if the user pressed cancel button (default: about:blank)

Use it with <ui-component name="cookie">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

example.html
<ui-component name="cookie" class="hidden">This site uses cookies for visitor statistics. By continuing to browse the site you are agreeing to our use of cookies. <a href="/privacy/">Privacy Policy</a></ui-component>

<div>CONTENT</div>
<div>CONTENT</div>
<div>CONTENT</div>
<div>CONTENT</div>
<div>CONTENT</div>
<div>CONTENT</div>
<div>CONTENT</div>