LH idb-keyval provides idb-keyval, Jake Archibald’s small promise-based key-value store built on IndexedDB, once for every plugin on a WordPress network. Plugins that keep data in the browser share one copy of the library instead of each loading their own.
- Registers the library as the
idb-keyvalscript module. A plugin lists it as a dependency of its own module and writesimport { get, set } from 'idb-keyval';. - Ships a classic build for service workers, which cannot use import maps, at the URL
LH_Idb_Keyval::get_umd_url()returns. - The plugin version is the library version.
- No settings, no admin notices, nothing written to the debug log.
Plugins that use it don’t require it. Each bundles a fallback copy and the shared fallback snippet kept in this plugin, so it keeps working when LH idb-keyval is inactive, and Site Health reports which plugins are using their own copy.