QuotaExceededError the quota has been exceeded — Firefox 报错解决
Firefox 报错 :
QuotaExceededError the quota has been exceeded
在Firefox地址栏 输入about:config
在高级设置界面 搜索dom.storage.default.quto
将其 值 设置到 102400 或者 更大 可解决。
如需从开发中将其扩容暂时没有方案,有知道的同学可以分享一下~
楼主了解到的方法是:重写 Localstorage 的方法 (getItem,setItem,removeItem…)
以下记录一种写法:
function getStorage() {var storageImpl;try {localStorage.setItem("storage", ""); localStorage.removeItem("storage");storageImpl = localStorage;}catch (err) {storageImpl = new LocalStorageAlternative();}return storageImpl;}function LocalStorageAlternative() {var structureLocalStorage = {};this.setItem = function (key, value) {structureLocalStorage[key] = value;}this.getItem = function (key) {if(typeof structureLocalStorage[key] != 'undefined' ) {return structureLocalStorage[key];}else {return null;}}this.removeItem = function (key) {structureLocalStorage[key] = undefined;}}cusSto = getStorage();
参考
设置浏览器本地存储容量
报错解决参考链接