0

I'm setting a jStorage key using $.jStorage.set("blah", largeDataString);. The large datastring in question is 3mb. It works fine in all browsers except Chrome. Why is this?

http://www.jstorage.info/

rickyduck
  • 4,030
  • 14
  • 58
  • 93
  • chrome only gives you 2.5 million chars, which is fewer bytes than 3 million unicode chars uses. – dandavis Jun 26 '13 at 21:43
  • @dandavis but this comment says 2.5million chars is 5mb. My file size is only 3? http://stackoverflow.com/questions/2989284/what-is-the-max-size-of-localstorage-values#comment8787385_3260214 – rickyduck Jun 26 '13 at 22:04
  • @rickyduck you can store 5 million actual bytes, 5MB, but when you store a javascript string each char uses two bytes, so you can effectively store only half that amount. Firefox gives you a full 5 million js string chars, so it can store twice as much un-encoded text as chrome. IE is in-between Chrome and firefox, some weird amount that's not a factor of 2.5m or 5m... JSZip is a good way to effectively double-quadruple the available space. – dandavis Jun 26 '13 at 22:55
  • @dandavis - cheers, I will check jszip. Weirdly though I tried on chrome this morning with no issues. – rickyduck Jun 27 '13 at 08:29

0 Answers0