Does fnFilter('') delete SpryMedia cookies?

Does fnFilter('') delete SpryMedia cookies?

DavidBoomerDavidBoomer Posts: 21Questions: 0Answers: 0
edited August 2013 in DataTables 1.9
Probably I'm not asking a reasonable question, but just curious as I am seeing this behavior when multiple datatables have been created across a number of pages.

Thanks,

David

Replies

  • DavidBoomerDavidBoomer Posts: 21Questions: 0Answers: 0
    more info... ASP.NET website where some datatables are created from gridviews.
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    No it doesn't directly - however, the thing to remember is that cookies are limited to 4K - if you have a cookie string which is larger a lot of HTTP servers will reject the request.

    As such, DataTables has some "protection" code to try and ensure that the cookie size will never go above 4K. If it does, it deletes the oldest cookie - so it might be that which you are seeing.

    One option is to use localStorage ( http://datatables.net/blog/localStorage_for_state_saving ). 1.10 will use localStorage rather than cookies (tough luck to IE6/7 :-) ).

    Allan
  • DavidBoomerDavidBoomer Posts: 21Questions: 0Answers: 0
    Thanks, Allan. We are at IE8 (gasp), so this might work!
  • DavidBoomerDavidBoomer Posts: 21Questions: 0Answers: 0
    will there be an option for sessionStorage as well?
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Not built in - but you can use the same basic method as described in the blog with 1.10 but using sessionStorage rather than localStorage.

    Allan
This discussion has been closed.