Saving three table states in the cookies at the same time?
Saving three table states in the cookies at the same time?
![artyommaths](https://secure.gravatar.com/avatar/d64b33c045e2fa05a05d7383a0511c7b/?default=https%3A%2F%2Fvanillicon.com%2Fd64b33c045e2fa05a05d7383a0511c7b_200.png&rating=g&size=120)
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