FlagFix
Feature management

Offline behavior

Last snapshot for flags. Durable queue for events.

Last updated on

Flags and events fail differently.

Flags. If the browser has a cached snapshot for the current targeting key, start() uses it, then tries to refresh. If refresh fails, reads keep returning that snapshot. Changing identity (identify, reset) drops the previous snapshot on purpose, so a cached user is not shown another user's flags. With no cache and no network, reads return the fallback.

Events. storage.mode: "persistent" writes the queue to IndexedDB in the browser and to SQLite in Node (node:sqlite, or better-sqlite3 when selected). The default when persistent storage cannot open is to reject start() (unavailable: "reject"). Set unavailable: "fallback-memory" only when losing the queue on crash is acceptable. The SDK will not claim the memory fallback is persistent.

The browser flushes with keepalive when the tab is hidden, and wakes the queue on online. None of this retries forever past Retry-After and the batch byte ceiling.

Was this page useful?