Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Using IndexedDB in Angular: Schema Versioning, Transactions and an Offline Outbox
In IndexedDB the schema changes only inside onupgradeneeded when the version goes up, and a transaction commits by itself at an await that is not IndexedDB; so the network work comes first and the writes after. We show per-version migrations, TransactionInactiveError and another tab blocking an upgrade in Chromium and WebKit, then build the reading list with idb in Angular and an outbox that sends offline reviews without duplicates using idempotency keys.
Which Browser Storage? localStorage, IndexedDB, Cache API, OPFS, cookieStore and Quota Management
Put a small preference in localStorage, queryable records in IndexedDB, HTTP responses in the Cache API, files in OPFS and values the server also reads in cookieStore; all share the origin's quota and can be evicted without persist(). In Chromium 158 and WebKit 27.2 we show localStorage's 5 MiB limit, the Cache API ignoring max-age, OPFS failing in an ephemeral session, estimate()/persist() results and Safari's 7-day deletion rule.