---
title: cookiestore
slug: develop/cookiestore
docTags: 
createdAt: 2025-03-11T07:07:19.526Z
---

The *cookiestore* object retrieves a list of cookies from the containing browser (which implies that this class is only available for code running inside a browser instance, not from roNodeJs).

**cookiestore IDL**

```text
interface Cookie {
    attribute String domain;
    attribute String path;
    attribute String name;
    attribute String value;
};
 
interface cookiestore {
    Array<Cookie> getCookies();
}
```

## Object Creation

```javascript
let CookieStoreClass = require("@brightsign/cookiestore");
let cookieStore = new CookieStoreClass();
```

## Cookie

### getCookies()

```javascript
    Array<Cookie> getCookies()
```

Gets cookies from the containing browser.

- `domain` <font color="#704ae0">string</font>: Specifies the hosts that are allowed to receive the cookie, including subdomains.
- `path` <font color="#704ae0">string</font>: To send the Cookie header, this URL path must exist in the URL request. 
- `name` <font color="#704ae0">string</font>: The name of the cookie
- `value` <font color="#704ae0">string</font>: The value of the cookie

## Example

To list the cookies saved on a browser instance on a console:

```javascript
let CookieStoreClass = require("@brightsign/cookiestore");
let cookieStore = new CookieStoreClass();

let cookies = cookieStore.getCookies();

cookies.forEach((cookie) => {console.log("Cookie domain: " + cookie.domain + " Cookie path:" + cookie.path + " Cookie name:" + cookie.name + " Cookie value:" + cookie.value)});
```

