1

Possible Duplicate:
What is the max size of localStorage values?

I'm looking at making a little lib that treats localStorage more like a DB in where 1 key will be 1 "table", and it's records will be objects that I strignify via JSON and separated by /r.

This means that the data in 1 key could get fairly big. So my question is, how much data can you store in 1 key.

Community
  • 1
  • 1
user441521
  • 6,942
  • 23
  • 88
  • 160
  • 1
    It's not the key. It's generally 5mb per domain for localStorage. – ahren Nov 27 '12 at 21:01
  • possible duplicate of [What is the max size of localStorage values?](http://stackoverflow.com/questions/2989284/what-is-the-max-size-of-localstorage-values) and [JavaScript memory and HTML5 LocalStorage limitations on smartphones](http://stackoverflow.com/questions/7267354/javascript-memory-and-html5-localstorage-limitations-on-smartphones) – PeeHaa Nov 27 '12 at 21:05
  • Is does seem it is a duplicate (that's not me though). However nobody answered his question and only Mike answered mine below. I know the overall storage limits, but I was just asking per key. I wasn't sure if there were any limits around that. The data I'm storing will be small, but I just prefer a more database look and feel when working with data. Thanks all. – user441521 Nov 27 '12 at 21:19

1 Answers1

3

I don't believe there is a limit to the size of data that can be stored in a single key. There are however browser-specific (and sometime configurable) limits to the overall storage allocated to a domain. 5MB is the standard here, though implementations vary.

Mike Brant
  • 70,514
  • 10
  • 99
  • 103