Back to Home

Dexie BFCache Interaction

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.

Dexie Connection: Closed
BFCache Status (via DevTools): Check Application Tab

How to Verify

1. Open DevTools

Press F12 or Cmd+Option+I to open Chrome DevTools.

2. Go to BFCache View

Navigate to ApplicationBack/forward cache (in the left sidebar).

3. Open Connection

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();

4. Test BFCache

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).