Applies to: Jamroom 7.0+ Last verified: 2026-10-24
  • What it does

    jrSetCookie(name, value, days) sets a browser cookie, for example to remember a visitor's choice.

    jrSetCookie('dash_reload', 'on', 30);
    • value can be a string, a number or an object: it's stored as JSON.
    • days is how long the cookie lasts. Default: 30.
    • The cookie is set for the whole site, and marked secure on https:// sites.

    Read it with jrReadCookie(), and delete it with jrEraseCookie(). Jamroom adds a site-specific suffix to the name, so use these functions rather than reading document.cookie yourself.

Tags