idb-keyval icon indicating copy to clipboard operation
idb-keyval copied to clipboard

IndexedDB connections must be closed so bfcache works

Open raray opened this issue 1 year ago • 0 comments

The browser's back/forward cache doesn't work when IndexedDB has an open connection. Currently, a connection is opened here and then never closed:

https://github.com/jakearchibald/idb-keyval/blob/6695b178d3e1a6a6252d6d72bf8b1830253aadc1/src/index.ts#L13

This causes Lighthouse to fail a check (https://developer.chrome.com/docs/lighthouse/performance/bf-cache/):

image

raray avatar Jul 27 '23 16:07 raray