alfajango / jquery-dynatable

A more-fun, semantic, alternative to datatables
http://www.dynatable.com
Other
2.77k stars 361 forks source link

NS_ERROR_ILLEGAL_VALUE exception in Firefox #80

Closed theodorejb closed 10 months ago

theodorejb commented 10 years ago

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?

JangoSteve commented 8 years 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?

martianoff commented 8 years ago

Unfortunately NS_ERROR_ILLEGAL_VALUE can't be catched by try / catch so PushState option doesnt work on any large datasets in FF

martianoff commented 8 years ago

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));

mbrodala commented 8 years ago

For us simply disabling the pushState feature in dynatable did the trick since we are not using it anyways.

lamehost commented 7 years ago

I confirm that disabling pushState works