idb-keyval
idb-keyval copied to clipboard
IndexedDB connections must be closed so bfcache works
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/):