Closed theodorejb closed 10 months ago
Hmm, this was definitely a use-case we had taken into account (see these line). Are you getting an exception that isn't being caught by the try/catch
block? Or are you just saying it'd be nice to have a way that doesn't require a try/catch and can still cache the dataset?
Unfortunately NS_ERROR_ILLEGAL_VALUE can't be catched by try / catch so PushState option doesnt work on any large datasets in FF
Small improvement using LZstring compressor (http://pieroxy.net/blog/pages/lz-string/index.html)
in push function
cache = { dynatable: { dataset: LZString.compress(JSON.stringify(settings.dataset)) } };
in pop function
settings.dataset = JSON.parse(LZString.decompress(data.dataset));
For us simply disabling the pushState
feature in dynatable did the trick since we are not using it anyways.
I confirm that disabling pushState
works
I'm dealing with hundreds of large records, and it seems that the
dataset.originalRecords
array is causing the HTML5 pushstate cache to overrun Firefox's 640k character limit. Might it be better to use localStorage or sessionStorage for this cache, as Mozilla's documentation suggests?