Allows apps to store, retrieve, and erase cookies against the host Jira/Confluence. These cannot be seen by other apps.
Remove the given cookie.
Name | Type | Description |
---|---|---|
name | String | the name of the cookie to remove |
1 2AP.require("cookie", function(cookie){ cookie.save('my_cookie', 'my value', 1); cookie.read('my_cookie', function(value) { alert(value); }); cookie.erase('my_cookie'); });
Get the value of a cookie.
Name | Type | Description |
---|---|---|
name | String | name of cookie to read |
callback | function | callback to pass cookie data |
1 2AP.require("cookie", function(cookie){ cookie.save('my_cookie', 'my value', 1); cookie.read('my_cookie', function(value) { alert(value); }); });
Save a cookie.
Name | Type | Description |
---|---|---|
name | String | name of cookie |
value | String | value of cookie |
expires | Number | number of days before cookie expires |
1 2AP.require("cookie", function(cookie){ cookie.save('my_cookie', 'my value', 1); });
Rate this page: