Increasing 5MB Storage Limit in Chrome

2019-05-08 21:42发布

问题:

We have a POS app written in html5 and we are using the localStorage to store orders and other info.

I am experiencing the limits of the 5MB that chrome offers and it is causing the app to crash.

Is there an easy way to increase this limitation?

thanks

回答1:

Check this link, it discusses your problem and it might help you

The db file path for chromium and chrome on windows vista look like...

C:\Users\<username>\AppData\Local\Chromium\User Data\Default\Application Cache\Index 
C:\Users\<username>\AppData\Local\Google\Chrome\User Data\Default\Application Cache 

Here's the sql statement to run...

insert into Quota values("http://127.0.0.1:8008/", 100000000); 

You can run that command using the sqlite3 command line tool available here, http://www.sqlite.org/download.html. Put whatever origin url you'd to give more storage to in there.



回答2:

No, there is no way to increase 5MB localStorage per-domain limit. You can use IndexedDB instead for storing your data, though. Read more: IndexedDB and Limits