Cookies aren't created for large tables

Cookies aren't created for large tables

filfil Posts: 2Questions: 0Answers: 0
edited February 2013 in Bug reports
http://sorseg.dyndns.org/test/test.html

I have two tables on this page.
If I execute
[code]dt=$('.searchresult').dataTable({'bStateSave':true});[/code]
then cookie is created.
Then I delete this cookie and create dataTable for larger table:
[code]dt=$('.searchresult2').dataTable({'bStateSave':true});[/code]
The cookie is not created and state is not saved.
I tried in chrome and firefox

Replies

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin
    Such a cookie, holding all of the standard state information DataTables holds, would exceed the 4KiB limit, and thus give a server error. DataTables disallows such large cookies from being created.

    I'd suggest you use localStorage (which will be the default in 1.10): http://datatables.net/blog/localStorage_for_state_saving

    Allan
  • filfil Posts: 2Questions: 0Answers: 0
    Thank you very much! That helped!
This discussion has been closed.