Demonstrating that open IndexedDB connections don't necessarily block BFCache.
By default, Dexie closes all connections on pagehide to
avoid blocking BFCache. This repro disables that behavior to show that
Chrome can still BFCache the page even with an open connection,
provided there are no version change or locking conflicts.
Press F12 or Cmd+Option+I to open Chrome
DevTools.
Navigate to Application → Back/forward cache (in the left sidebar).
Click the Open Dexie Connection button above. This script runs:
Dexie.disableBfCache = true;
const db = new Dexie('BfCacheDB');
db.version(1).stores({ items: '++id' });
await db.open();
Click Test back/forward cache in the DevTools panel. This will navigate away and back.
Observe that the page state is preserved and the connection remains open (if restored from cache).