Reputation: 1389
I was wondering if it's possible to remove a specific storage from and indexeddb or, in case this is not possible, how to clean all records inside a storage.
Thanks
Upvotes: 0
Views: 134
Reputation: 1089
use delete(ID);
function in indexeddb
var request = store.delete(id);
request.onsuccess = function(e) {
console.log("deleted")
};
request.onerror = function(e) {
console.log("error--"+e);
};
yes to delete entire store
db.deleteObjectStore("storeName");
refer this for more
Upvotes: 1