Last updated Dec 8, 2017

Using cookies in your gadget

This page is part of the Gadget Developers' JavaScript Cookbook.

How do I use cookies in my gadget?

Use the gadget object API for createCookie, readCookie and eraseCookie:

1
2
view: {
  template: function(args) {
    var gadget = this;
    gadget.createCookie("columnOrder", "assignee", 30);

    var columnOrder = gadget.readCookie("columnOrder");

    gadget.eraseCookie("columnOrder");
  }
}

Gadget Developers' JavaScript Cookbook
Using the Atlassian Gadgets JavaScript Framework

Rate this page: