Re: Increasing Client-side Storage

73 views
Skip to first unread message

Joseph Lust

unread,
Nov 8, 2012, 12:32:03 PM11/8/12
to google-we...@googlegroups.com
Sounds like a likely browser defect.

Limit of 5MB per app per browser. According to the HTML5 spec, this limit can be increased by the user when needed; however, only a few browsers support this

So it really depends on the browser, as my understanding is that the user is prompted to allow greater storage. Clearly you cannot just set it infinite or a malicious page could crash someone's harddrive. What browsers are you using this on and do all of them generate the error?

Sincerely,
Joseph

Paul Stockley

unread,
Nov 8, 2012, 12:52:26 PM11/8/12
to google-we...@googlegroups.com
Actually the limit is 2500 characters in many browsers as they store the data in mult-byte format. Unless the browser supports it, there is no way of increasing this. What browser/versions are you using?

Joseph Lust

unread,
Nov 8, 2012, 1:39:58 PM11/8/12
to google-we...@googlegroups.com
I had been using FF last year, though I was only storing about 250K of serialized character data.

Perhaps take a look at the source of the Kindle Chrome app. It stores the book content offline. They must handle this somehow.


Sincerely,
Joseph

alucard

unread,
Nov 8, 2012, 4:15:27 PM11/8/12
to google-we...@googlegroups.com
If you are developing for mobile devices you could try with Phonegap (aka Apache Cordova). They have a file and a storage API. I believe these support large ammounts of data. Also checkout gwt-phonegap.

Hope this helps.

On Thursday, November 8, 2012 12:00:47 PM UTC+1, Nukeface wrote:
So i read the Client-side Storage introduction article. I do have a question.

The company I'm doing my work experience is having trouble with the Client-side storage of all browsers as the size limits are met. We're developing an app which requires offline capability and uses lots and lots of data on the mobile device. 

Is there a way to automatically increase the maximum size, or set it to unlimited size, for the application? Or is there a way to achieve this with user confirmation? 

Our problem is that the application crashes when the limit is hit, which happens during synchronization, so not all of the required user data is yet present. 

Thx in advance.

Oliver Krylow

unread,
Nov 8, 2012, 5:24:56 PM11/8/12
to google-we...@googlegroups.com

Currently the only browser I know of that allows the user to set the size of local storage is safari .

But in general I do not recommend using local storage for data heavy storing. Think of it rather as advanced cookies. The best use case is if you want to serialize the state of your views to json ,so that you can quickly recover it when the user revisits your app.

Local storage is absolutely NOT recommended for storing sensitive data, it is unsafe.

If you need to persist a lot of data on a fat client I suggest taking a look the HTML file api.
It gives you a sandboxed space on the clients machine with unlimited storage. The downside is, that it is a HTML 5 feature, so no older browser.

Good luck,

Oliver

Reply all
Reply to author
Forward
0 new messages