Skip to content

Instantly share code, notes, and snippets.

@virtualstaticvoid
Created September 6, 2023 08:50
Show Gist options
  • Save virtualstaticvoid/a4299d71394dbfa4818739ac2b3d03e8 to your computer and use it in GitHub Desktop.
Save virtualstaticvoid/a4299d71394dbfa4818739ac2b3d03e8 to your computer and use it in GitHub Desktop.
Clear Browser's IndexedDB
window.indexedDB.databases().then((r) => {
for (var i = 0; i < r.length; i++) window.indexedDB.deleteDatabase(r[i].name);
}).then(() => {
alert('Browser IndexedDB cleared.');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment