LocalStorage key diappears

I'm trying to pass a fairly large array (> 2,000 objects) between apps using localStorage. All of my other keys are there when I get to the other app, but for some reason this one gets emptied out. Has anyone seen this before? Am I hitting some kind of limit?

Here's the original app - it has 2,735 items
image

Then as I click on another app, the "payments" key goes away... not sure why...
image

Ideas?

Hey @pyee! Since localStorage is browser specific, I wonder if you're running into a storage limit? It looks like the max limit is 5MB. Do you know if your payments data is > 5MB by any chance?

Thanks for the reply, @victoria

That particular array is just over 1MB with 3,237 objects currently in it, but the all_docs and filtered_docs arrays have MUCH larger objects, and they are 3.5 and 4.3MB respectively. So the limit may not be 5MB, since both of those persist to other apps, but it may be some other limit...

I'll try to trim those down and see if that helps. For reference, I'm doing my development in Chrome, and I have not changed any localStorage settings (that I know of).

Reducing the size of those objects allowed them to all pass through. Still not sure why it picked that object to remove - I guess it was the last one calculated, so it truncated that one. The other keys were much bigger, but I've cut that down now. Thanks!

Awesome, I'm glad it's working for you now! And your hypothesis definitely sounds correct to me.