Writing
Notes on browser storage
What actually happens when you put a database in a browser tab — the constraints the platform imposes, the failures that do not announce themselves, and the measurements behind the claims.
10 posts
How to benchmark browser storage without fooling yourself
How to benchmark IndexedDB and SQLite WASM in the browser: measure p95 and p99, test on a slow device, assert ratios rather than millisecond thresholds.
Browser storage eviction: quota, Safari, and the rebuild path
How browser storage eviction actually works — quota, navigator.storage.persist(), Safari's 7-day rule — and why a local database must be rebuildable.
Dexie alternative: how to check the drop-in claim is true
Dexie's API is the right shape; the open question is what runs underneath it. How to verify a drop-in replacement claim instead of taking it on trust.
IndexedDB vs SQLite WASM: which browser database should you use in 2026?
A side-by-side of IndexedDB and SQLite compiled to WebAssembly — query power, bundle cost, multi-tab safety and browser support — plus the four questions that decide it for a real application.
The localStorage size limit, and what to use instead
localStorage is capped near 5 MB, stores only strings, and blocks the main thread on every read. When that is fine, when it is not, and what to move to.
Offline-first vs local-first: which one do you actually need?
Cache-first, offline-first and local-first are three different amounts of work. Which one your app needs, and why the local copy owning the truth costs most.
SQLite WASM bundle size: what it costs and when it pays back
SQLite compiled to WebAssembly costs several hundred kilobytes. What actually downloads, why loading it synchronously makes your first page slower, and the fix.
Structured clone vs JSON.stringify: what survives storage
JSON.stringify silently loses Date, NaN, undefined, typed arrays, Map, Set and RegExp. Structured clone keeps them all. Here is a table of what each preserves.
Electing one writer across browser tabs with the Web Locks API
How the Web Locks API elects a single writer across browser tabs with no heartbeat and no timeout to tune — and the one failure mode you still have to handle.
What is OPFS? The origin private file system, explained
OPFS is a private, origin-scoped area the browser manages — not the user's disk. What sync access handles are, why SQLite needs them, and where OPFS is missing.