Cookie Store API - Web APIs | MDN
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers. Note: This feature is available in Service Workers. The Cookie Store API is an asynchronous API for managing cookies, available in windows and also service workers. The original method of getting and setting cookies involves working with document.cookie to get and set cookie information as a string of key/value pairs. In addition to this being cumbersome and error prone, it also has a host of issues in the context of modern web development. The document.cookie interface is synchronous, single-threaded, and blocking. When writing a cookie you must wait for the browser to update the string of all cookies. In addition, the reliance on document means that cookies cannot be accessed by service workers, as they cannot access the document object. The Cookie Store API provides an updated method of managing cookies. It is asynchronous and promise-based, therefore does not block the eve
Cookie Store API - Web APIs | MDN Skip to main content Skip to search Cookie Store API Baseline 2025 * Newly available Since June 2025, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers. Want more browser support for this feature? Tell us why. * Some parts of this feature may have varying levels of support. Learn more See full compatibility Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers . Note: This feature is available in Service Workers . The Cookie Store A
related reading
- Using HTTP cookies - HTTP | MDNdeveloper.mozilla.org
- Intersection Observer API - Web APIs | MDNdeveloper.mozilla.org
- Service Worker API - Web APIs | MDNdeveloper.mozilla.org
- chrome.commands | API | Chrome for Developersdeveloper.chrome.com
- Web Workers API - Web APIs | MDNdeveloper.mozilla.org
- A service worker's life | Workbox | Chrome for Developersdeveloper.chrome.com
- Service worker overview | Workbox | Chrome for Developersdeveloper.chrome.com
- Logging AI agents into web apps: From cookie hacks to proper OAuthworkos.com
- passwords - Demystifying Web Authentication (Stateless Session Cookies) - Information Security Stack Exchangesecurity.stackexchange.com
- Understanding The Web Security Model, Part IV: Cross-Origin Resource Sharing (CORS)educatedguesswork.org
- GitHub - fastify/fastify-cookie: A Fastify plugin to add cookies support · GitHubgithub.com
- ServiceWorkerGlobalScope: skipWaiting() method - Web APIs | MDNdeveloper.mozilla.org