Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error: QUOTA_EXCEEDED_ERR for localStorage #5

Open
pdeschen opened this issue Oct 21, 2011 · 2 comments
Open

Uncaught Error: QUOTA_EXCEEDED_ERR for localStorage #5

pdeschen opened this issue Oct 21, 2011 · 2 comments

Comments

@pdeschen
Copy link
Contributor

Got the following error while interacting with the sandbox. I will try to inspect the actual localStorage content and report back. According to the spec, localStorage should be 5Mb which seems plenty enough for the sandbox history!

Maybe consider compress content before adding to the storage?

backbone-localStorage.min.js:8Uncaught Error: QUOTA_EXCEEDED_ERR: DOM Exception 22
_.extend.updatebackbone-localStorage.min.js:8
Backbone.syncbackbone-localStorage.min.js:8
f.extend.savebackbone.min.js:12
Sandbox.Model.Backbone.Model.extend.addHistorysandbox-console.js:86
Sandbox.Model.Backbone.Model.extend.evaluatesandbox-console.js:146
Sandbox.View.Backbone.View.extend.keydownsandbox-console.js:307
Njquery-1.6.1.min.js:16
f.event.handlejquery-1.6.1.min.js:17
f.event.add.i.handle.kjquery-1.6.1.min.js:16
@wjcrowcroft
Copy link
Member

Thanks - what browser were you in?

Any ideas what commands were run that might have had an unusually large output?

I can think of several ways to limit the history to prevent this from happening which I'll look into.

@pdeschen
Copy link
Contributor Author

I'm on Chrome. I don't know if the quota is set for the whole browser or on a key basis. Hence, if that's for the whole browser, data could come from any webapp. Otherwise, I don't recall typing a 5Mb full of javascript:-)

On a side note, maybe you could use the sessionStorage instead? I understand the idea of using a persistent localStorage but the sandbox might end up adding stuff forever. Another options would be to have a rolling history buffer like in a bash or something, with a configurable size. In fact, a flag could also be set during init to either use session or local storage (i.e. {persistentHistory: false})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants