Saving three table states in the cookies at the same time?
Saving three table states in the cookies at the same time?
artyommaths
Posts: 1Questions: 1Answers: 0
I have three tables and I'm saving each state (bStateSave) in the cookie but it only save two of them and when I'm using the third table its state will override one of two cookies and not create a third one. So how to make cookies for each separate table at the same time and avoid overriding. SpryMedia_DataTables_table1, SpryMedia_DataTables_table2, SpryMedia_DataTables_table3
This discussion has been closed.
Answers
Very likely you are encountering the 4KiB limit of cookies here. DataTables will delete the oldest cookie that it has created on the page to stop it going over that limit (otherwise servers or browsers can throw errors about the page).
Best thing to do would be to upgrade your DataTables to 1.10 which uses localStorage rather than cookies and doesn't have this limit, or any of the other issues associated with cookies.
Allan