Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

cookies.CookieStore

The CookieStore type of the cookies API represents a cookie store in the browser.

Windows in different browsing modes may use different cookie stores — a private browsing/incognito mode window, for instance, will use a separate cookie store from a non-incognito/private window.

Type

Values of this type are objects, which can contain the following properties:

id
A string representing the unique identifier for the cookie store.
tabIds
An array of integers, which identifies all of the browser tabs that share this cookie store.

Browser compatibility

Chrome Edge Firefox Firefox for Android Opera
Basic support Yes Yes 45.0 48.0 33

Examples

In the following snippet, the cookies.getAllCookieStores() method is used to retrieve all the cookie stores currently available in the browser, and print out each cookie store ID, and the tabs that currently share each cookie store.

chrome.cookies.getAllCookieStores(function(cookieStores) {
  for(var i = 0; i < cookieStores.length; i++) {
    console.log('Cookie store: ' + cookieStores[i].id +
                '\n Tab IDs: ' + cookieStores[i].tabIds);
  }
});

Each member of the cookieStores array is a CookieStore object.

Acknowledgements

This API is based on Chromium's chrome.cookies API. This documentation is derived from cookies.json in the Chromium code.

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

Document Tags and Contributors

 Contributors to this page: Makyen, wbamberg, chrisdavidmills
 Last updated by: Makyen,