Is there a way to increase the size of localStorage in Google Chrome to avoid QUOTA_EXCEEDED_ERR: DOM Exception 22

前端 未结 4 941
忘了有多久
忘了有多久 2020-12-08 19:46

I\'ve written a webapp that allows you to store the images in the localStorage until you hit save (so it works offline, if signal is poor).

When the localStorage rea

4条回答
  •  一生所求
    2020-12-08 20:28

    The quota is for the user to set, how much space he wishes to allow to each website.

    Therefore since the purpose is to restrict the web pages, the web pages cannot change the restriction.

    If storage is low, you can prompt the user to increase local storage.

    To find out if storage is low, you could probe the local storage size by saving an object then deleting it.

提交回复
热议问题