Setting the value of 'dataURL' exceeded the quota

前端 未结 5 847
[愿得一人]
[愿得一人] 2020-12-16 09:28

I have a JavaScript code which save string to the Local storage, the string size is 400000,

var dataURL = canvas.toDataURL(\"image/jpg\").toString();
localSt         


        
5条回答
  •  清酒与你
    2020-12-16 10:04

    Clearing the local storage with localStorage.clear(); worked for me.

    If you're on Firefox you may need to use window.localStorage.clear();

提交回复
热议问题