jakearchibald / idb-keyval

A super-simple-small promise-based keyval store implemented with IndexedDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IndexedDB connections must be closed so bfcache works

raray opened this issue · 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:

const request = indexedDB.open(dbName);

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

image