[Solved] QuotaExceededError the quota has been exceeded — Firefox

QuotaExceededError the quota has been exceeded — Firefox
Firefox Error:

QuotaExceededError the quota has been exceeded

1. Enter about:config in the Firefox address bar

2. Search DOM.storage.default.Quto in the advanced settings interface.

3. Set its value to 102400 or greater.

 

Solution:

rewrite the method of Localstorage (getitem, setitem, removeitem…)
the following record can be written:

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();

Read More: