unload events use localStorage now, idb is async and cant be relied on here