在 Opera 中,您只需在opera:webdatabases
地址字段中输入并删除存储在您计算机上的所有 Web SQL 数据库。
你如何在 Firefox 中做同样的事情?我需要删除本地主机上的 IndexedDB 以试验新版本。
我知道这很旧,但在Firefox中有一种方法可以做到这一点:
我想出了如何删除数据库。Windows 以每个应用程序为基础单独存储用户数据(在 Windows 7 上的 C:\Users\\AppData 中)。于是我在这个目录下找到了 Firefox Profiles 文件夹,进入 indexedDB 文件夹,删除了 sqlite 文件。然后我重新启动了 Firefox,它成功了!Windows 7 的完整路径如下:C:\Users\\AppData\Roaming\Mozilla\Firefox\Profiles\<*>.default\indexedDB
我发现在控制台(Ctrl+Shift+K)中运行此代码是一个更简单的解决方案:
indexedDB.deleteDatabase('MyDatabaseName').onsuccess=(function(e){console.log("Delete OK");})
Firefox 索引数据库(Ubuntu)
~/.mozilla/firefox-trunk/*.default/storage/persistent/<folder_to_delete>
这对我有用。
On OS X 10.10.2 and Firefox 36.0.1, I deleted
~/Library/Application Support/Firefox/Profiles/*.default/storage/default/<url>/idb
在 Ubuntu 和可能大多数 linux 发行版上,它位于您的主目录中
~/.mozilla/firefox/<*>.default/indexedDB
这是一个删除每个网站的 indexedDB 目录的节点脚本。
C:\Users\\AppData\Roaming\Mozilla\Firefox\Profiles\<*>.default\indexedDB
基于Aadit的回答。
var userName = "myWindowsUserName";
var fs = require("fs");
var root = "C:\\Users\\" + userName + "\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\";
var dir = fs.readdirSync(root);
var deleteFolderRecursive = function (path) { // http://www.geedew.com/2012/10/24/remove-a-directory-that-is-not-empty-in-nodejs/
if (fs.existsSync(path)) {
fs.readdirSync(path).forEach(function (file, index) {
var curPath = path + "/" + file;
if (fs.statSync(curPath).isDirectory()) { // recurse
deleteFolderRecursive(curPath);
} else { // delete file
fs.unlinkSync(curPath);
}
});
fs.rmdirSync(path);
}
};
var anyRemoved = false;
for(var i = 0; i < dir.length; i++) {
if(/\.default$/.test(dir[i])) {
var idbPath = root + dir[i] + "\\indexedDB";
var idbDir = fs.readdirSync(idbPath);
for (var i2 = 0; i2 < idbDir.length; i2++) {
anyRemoved = true;
var rmDir = idbPath + "\\" + idbDir[i2];
console.log("removing: " + rmDir);
deleteFolderRecursive(rmDir);
}
}
}
if(anyRemoved === false)
console.log("No indexedDB files were found.");
setTimeout(function () { }, 1000 * 5);
在 Firefox 中,可以通过以下方式删除 indexeddb:
Ctrl + Shift (Alt) + Delete
和选择清除离线网站数据。~/.mozilla/firefox/<profile>.default/storage/persistent/<website>
它似乎已被移下一两个目录。代替
C:\Users\\AppData\Roaming\Mozilla\Firefox\Profiles\<*>.default\indexedDB
尝试
C:\Users\\AppData\Roaming\Mozilla\Firefox\Profiles\<*>.default\storage\persistent\<site>