# js-cookie/js-cookie

A simple, lightweight JavaScript API for handling cookies, client-side.

Repository: https://github.com/js-cookie/js-cookie
Canonical: https://ross.abutalabs.com/products/js-cookie
Language: JavaScript
License: MIT
License Family: permissive
Topics: cookie, javascript
Last push: 2026-08-10T21:32:39+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 86, longevity 100
- inputs: {"age_days": 4185, "days_push": 23, "days_rel": 96, "gap_med": 13, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 22591, forks 2044 (observed 2026-08-28T04:11:32.765299+00:00)

## What it is
js-cookie is a simple, lightweight JavaScript library for reading, writing, and deleting browser cookies on the client side. It is RFC 6265 compliant, dependency-free, under 800 bytes gzipped, and ships both ES module and UMD variants.

## Use cases
- set and get browser cookies in javascript
- create cookies with expiration dates
- read all cookies visible to the current page
- custom cookie encoding and decoding
- manage cookies across a website in the browser

## When to choose
- you need a tiny, dependency-free cookie utility for the browser
- you want broad browser support with ES and CommonJS/AMD module compatibility
- you need RFC 6265 compliant cookie handling with custom converters

## When to avoid
- you need server-side cookie handling in Node.js rather than the browser
- you want a full state-management or storage solution like localStorage wrappers
- you need cookies with HttpOnly or Secure flags set from the client, which browsers do not allow

## Facets
- artifact type: library
- maturity: stable
- function: http-client, developer-tools
- domain: web-development, frontend, browser-extensions
- platform: browser
- tags: cookies, client-side, rfc6265, zero-dependency, umd, es-modules, javascript, nodejs

## Member repositories
- js-cookie/js-cookie (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:32.765299+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:56:57.840774+00:00, confidence not recorded.
  - readme: https://github.com/js-cookie/js-cookie (fetched 2026-08-28T04:11:32.765299+00:00, sha 8c7c04924ddb)
  - registry_npm: https://registry.npmjs.org/js-cookie (fetched 2026-08-29T07:55:27.167701+00:00, sha 8ad52238ca80)
- Data as of 2026-08-30T08:39:29.467469+00:00.
