Kar

Kar started this conversation 1 week ago.

Inconsistent indexedDB Blob behavior across browsers: Chrome vs Safari

I store Blob objects in IndexedDB and later retrieve them. In Chrome and Edge, this works across tabs and refreshes—even when accessed via indexes. In Safari, they sometimes fail or come back empty, especially with getAll() after reopening. What's causing inconsistency?

Digiaru

Posted 1 week ago

IndexedDB has historical inconsistencies in Blob support across browsers. Safari/WebKit is especially unreliable—retrieved Blobs may not deserialize properly when accessed through indexes, or when accessed after browsing sessions WebKit Bugzilla. Workarounds: • Store Blobs as ArrayBuffers and MIME type instead of using direct Blob values. • Retrieve via object store, not index, to avoid Safari issue. • Alternatively, store small binary data as Base64 or use a blob conversion on load. • Always verify in your target browsers.


🏷️ Category This issue falls under: Web Development → Browser APIs → IndexedDB → Blob storage / cross browser compatibility


🧷 Example Tags for Posting sql Copy code javascript, indexeddb, blob, safari, webkitblobresource, cross-browser, web-api, webkit-bug