Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
168 views
in Technique[技术] by (71.8m points)

javascript - How to increase local storage memory in chromium?

I already searched a lot but did not found anything helpful,

I'm looking for a way to increase the local storage memory in chromium.

Anything on it would be helpful.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can't, it's limited and can't be changed. This is a design decision made by Chromium, with the reason being that it doesn't scale well. With that being said there are few other solutions you can use, check out this MDN about saving data in the browser.

When someone asked the Chromium team members to increase the size, this is what one of them responded:

We don't want people to store large amounts of information in LocalStorage. The API can block a page (and any other pages in your same renderer process) while it loads LocalStorage into memory because it's a synchronous API. Honestly, we'd just plain not support it if we could, but too many developers/sites rely on it. So this is the compromise.

But clearly we don't want you loading hundreds of megs into memory and thus blocking everything in the web browser for extended periods of time.

IndexedDB is a bit easier than WebSQLDatabase and will be ready for prime time before long. WebSQLDatabase isn't that complicated. FileSystem is really the right place to store big files (which is what it sounds like you're doing) and is available in Chrome 9. I suggest you look at these alternatives.

I'm tempted to mark this as a WontFix...

But, IndexedDB might be a good solution for you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...