iCookieDuration
iCookieDuration
LightningCode
Posts: 3Questions: 0Answers: 0
Hi, and first off let me thank you for a very nice free package.
We're using v1.8.2, which is unlikely to change for a while at least. I see you've done a good bit of work on the persistence front, but for now the cookie solution is working fine for us. I posted this in "General" since the same persistence scheme is one of the options in 1.9.x.
My question is in regards to the default timeout of 7200 seconds (2 hr). Is it in fact the case that unless the user changes a setting, resetting the cookie, that the table will return to the default settings after 2 hours (or certainly overnight, correct?)?
I realize we can set our own timeout using iCookieDuration, so we'll use that as a workaround. I'm curious what use case prompted that default, as it seems to me that in most cases users would find such behaviour disconcerting.
We're using v1.8.2, which is unlikely to change for a while at least. I see you've done a good bit of work on the persistence front, but for now the cookie solution is working fine for us. I posted this in "General" since the same persistence scheme is one of the options in 1.9.x.
My question is in regards to the default timeout of 7200 seconds (2 hr). Is it in fact the case that unless the user changes a setting, resetting the cookie, that the table will return to the default settings after 2 hours (or certainly overnight, correct?)?
I realize we can set our own timeout using iCookieDuration, so we'll use that as a workaround. I'm curious what use case prompted that default, as it seems to me that in most cases users would find such behaviour disconcerting.
This discussion has been closed.
Replies
iCookieDuration works fine to change the default timeout. We've now got ten years set as our persistence timeout.
I just don't see a short default making sense in any real use case.
Bob on.
> By the way, is there any chance of this default being changed to something more like a year (or more) in a future release? :-)
Not likely to change the default unless there is a _very_ compelling reason to do so (i.e. a bug). You can use the ability to set defaults ( http://datatables.net/release-datatables/examples/advanced_init/defaults.html ) to set your own, but changing something that is already int he wild, that other developers might rely upon would be bad.
The reason for the short duration is because DataTables is specifically designed for enhancing tabular data (i.e. statistics etc), and I felt it likely that if you hadn't been on such a page after about 2 hours you would want it to reset back to the start. Useful in some cases, not in others, that's why the default can be configured :-).
Allan