Histore
discontinuedby Jason Miller (developit) · since 2018
200-byte browser key-value store that persists data in the page's history.state.
discontinued. Single 1.0.0 release in May 2018 and no commits since; still installable from npm.
Overview
Histore is a tiny JavaScript library by Jason Miller (developit) that turns the browser's navigation state into a key-value store. Values are written with history.replaceState, so they survive reloads of the same tab and back/forward navigation but, unlike localStorage or sessionStorage, are not shared with other tabs. Objects are cloned with the structured clone algorithm, and the README cites room for about 640 KB of data. The whole library is about 200 bytes and exposes only get and set. It shipped as 1.0.0 in May 2018 and has not changed since. It is a neat trick for per-tab UI state, not a database for application data.
Strengths & trade-offs
Strengths
- +About 200 bytes with no dependencies
- +State is scoped to one tab, unlike localStorage
- +Survives reloads and back/forward navigation
Trade-offs
- −Tiny capacity
- −No queries, indexes or durability beyond the tab's history entry
- −Unmaintained since 2018
Great for
- +Per-tab UI state such as form drafts or scroll position
- +Demonstrating unusual browser storage APIs
Think twice for
- −Application data
- −Anything shared across tabs or devices
Capabilities
Native or official first-party support · 1 of 25 tracked
Scale & consistency
- Comfortable data size
- Small · ≤ 100 GB
- Horizontal scaling
- None
- Multi-region
- No
- Transactions
- None
- Consistency
- Strong
- Schema
- Schemaless
- Architecture
- Embedded
- Query languages
- get/set API
Bounded by the browser's history-state size limit (the README cites about 640 KB).
Deployment
Ecosystem
Alternatives to Histore
The browser's built-in transactional object store, and the storage layer under most web local-first libraries.
histore vs indexeddb →The most popular IndexedDB wrapper, with live queries and an optional Dexie Cloud sync service.
histore vs dexie →In-memory JavaScript document store with indexes and pluggable persistence; no longer maintained.
histore vs lokijs →Tiny reactive in-memory store for tables and values, with persisters and CRDT sync.
histore vs tinybase →Tencent's mmap-backed key-value store for mobile apps, built as a faster SharedPreferences/NSUserDefaults.
histore vs mmkv →The original multi-threaded, dead-simple distributed memory cache for key-value blobs.
histore vs memcached →Histore FAQ
What is Histore?
Histore is a key-value database by Jason Miller (developit), first released in 2018. Histore is a tiny JavaScript library by Jason Miller (developit) that turns the browser's navigation state into a key-value store. Values are written with history.replaceState, so they survive reloads of the same tab and back/forward navigation but, unlike localStorage or sessionStorage, are not shared with other tabs. Objects are cloned with the structured clone algorithm, and the README cites room for about 640 KB of data. The whole library is about 200 bytes and exposes only get and set. It shipped as 1.0.0 in May 2018 and has not changed since. It is a neat trick for per-tab UI state, not a database for application data.
Is Histore open source?
Yes. Histore is open source. License: Apache License 2.0.
Does Histore support ACID transactions?
No. Histore does not provide ACID transactions; its consistency model is strong.
Does Histore scale horizontally?
Histore does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at small scale (≤ 100 GB).
How can I run Histore?
You can embed it in your application.
What is Histore best for?
Histore is a strong fit for per-tab UI state such as form drafts or scroll position and demonstrating unusual browser storage APIs. Think twice for application data.
What are the best alternatives to Histore?
Common alternatives to Histore include IndexedDB, Dexie.js, LokiJS, TinyBase and MMKV. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.
Is Histore still maintained?
Histore is discontinued. Single 1.0.0 release in May 2018 and no commits since; still installable from npm.
How popular is Histore?
Histore ranks #493 of 844 databases on the WhichDB Score (2.1/100), and #78 among key-value databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.



