Originally Posted by rnd me
you can also memorize the data with localStorage
excellent. as long as it's easy enough to get in and get out of storage (and I'm assuming that 3 minutes googling will give me the answer to that one, unless you have a one-liner up your sleeve...)
And that leads nicely to my next question (I would start another thread, but well, y'know...):
Let's just assume that I know nothing about the cache, local storage, etc. The JSON file can be ridiculously big - nearly 3MB in some cases (which seems quite big, and certainly seems to slow my phone down) but I don't need all of it in one hit. The way I've got it working so far is ajax call dumps all the json into the page then we filter from there, which works fine on the desktop but I guess smaller devices struggle with that load.
What I'm wondering is if:
a) it's possible, and
b) there would be any performance gain
to leaving the json where it is (I'm imagining localStorage here) and only pulling in the bits of data that match the filtering request.
or is it all just one big memory pot, and saving in one place ends up costing somewhere else, making it all balance out in the end?