Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SimonAngatia's avatar

Failed to execute 'setItem' on 'Storage': Setting the value of '136114546' exceeded the quota Vue

I am using Vue on the frontend of my Laravel application, the application is running really well on my local machine without any errors but on the server, there are some issues like click events not setting items. When I check the console, however, I get this error: Uncaught DOMException: Failed to execute 'setItem' on 'Storage': Setting the value of '136114546' exceeded the quota. I found this Related Question where the answer is storage being full but I noticed that this error happens when someone is using chrome browser. Other browsers work quite well.

This is the code that causes that error:

canliDegisim() {
            $.each(app.canliData.predictions, function(index, pre) {
                if (window.localStorage.getItem(index)) {
                    var eski = parseFloat(window.localStorage.getItem(index));
                    var yeni = parseFloat(pre.odds);
                    if (eski < yeni) pre.degisim = "artan";
                    if (eski > yeni) pre.degisim = "azalan";
                    if (eski === yeni) pre.degisim = "sabit";
                }
                console.log(pre.odds.toString());
                window.localStorage.removeItem(index);
                window.localStorage.setItem(index, pre.odds.toString());
            });
        },
0 likes
2 replies
Sinnbeck's avatar

Try running this command in your browser console to see how much is in localstorage

var _lsTotal=0,_xLen,_x;for(_x in localStorage){ if(!localStorage.hasOwnProperty(_x)){continue;} _xLen= ((localStorage[_x].length + _x.length)* 2);_lsTotal+=_xLen; console.log(_x.substr(0,50)+" = "+ (_xLen/1024).toFixed(2)+" KB")};console.log("Total = " + (_lsTotal / 1024).toFixed(2) + " KB");

Borrowed from: https://stackoverflow.com/a/15720835/1305117

Sinnbeck's avatar

You can also try just clearing all localStorage for your website and see if it helps

  1. Hit f12
  2. Select Application tab
  3. Open Local Storage to the left
  4. Right click the website and select 'Clear'

Please or to participate in this conversation.