Logos DX
    Preparing search index...

    RFC 6265 §5.3 — In-memory cookie storage with eviction.

    Handles duplicate detection, expiry eviction, session cleanup, and per-domain / total cookie limits.

    The jar is synchronous. Persistence (adapter.save) is fire-and-forget and managed by the plugin layer via the onChange callback.

    Index

    Constructors

    Methods

    • Remove a specific cookie by domain + path + name.

      Fires onChange regardless of whether the cookie existed — callers asking to delete a cookie is a meaningful event even when there is nothing to remove.

      Parameters

      • domain: string
      • path: string
      • name: string

      Returns void

    • Retrieve cookies matching the given URL, per RFC 6265 §5.4.

      Updates lastAccessTime on every returned cookie (§5.4 step 3) and fires onChange once if any match was retrieved. Non-retrieval calls (no matches) do not mutate state and do not fire the callback.

      The httpApi flag from construction determines whether httpOnly cookies are included: true for the HTTP request pipeline (default), false for non-HTTP APIs such as document.cookie.

      Parameters

      Returns Cookie[]

    • Seed the jar from a pre-existing cookie array (e.g., loaded from adapter). Applies full set() semantics: eviction, dedup, size check.

      Fires onChange exactly once after the bulk import finishes so a persistence backend does not see N redundant writes for one load.

      Parameters

      Returns void

    • Store a cookie per RFC 6265 §5.3.

      • Cookies with expiryTime in the past are treated as deletion requests.
      • Duplicate name+domain+path replaces old entry, preserving creationTime.
      • Expired cookies are evicted before inserting.
      • Per-domain and total limits are enforced after insert.

      Fires onChange after the mutation completes.

      Parameters

      Returns void