"bStateSave" saves pagination for one refresh but not subsequent refreshes

"bStateSave" saves pagination for one refresh but not subsequent refreshes

morrtymorrty Posts: 29Questions: 6Answers: 0
edited February 2013 in General
This is my table:

[code]
var tablePending = $('#table-pending').dataTable({
"sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
"sAjaxSource": "http://[redacted]/json/record/pending",
"bDeferRender": true,
"aoColumns": [
{ "mData": "record_id" },
{ "mData": "location" },
{ "mData": "user", "mRender": function ( data, type, full ) {
if (full["user_id"] === [redacted])
{
return '' + data + '';
}

return data;
}},
{ "mData": "date" },
{ "mData": "time", "sClass": "nowrap" },
{ "mData": "category" },
{ "mData": "commodity" },
{ "mData": "variety" }
],
"iDisplayLength": 10,
"bLengthChange": false,
"bFilter": false,
"bSort": false,
"sPaginationType": "bootstrap",
"bAutoWidth": true,
"oLanguage": {
"sInfo": "Showing _START_ to _END_ of _TOTAL_ entries over the last 12 months"
},
"bStateSave": true
});

[/code]

When I browse through pagination and then refresh the page, the page that I was on is saved. However, if I reload a second time, the state is lost. What could possibly be the issue?

Edit: Actually it appears to save the state more than once (sometimes), but if you continue to refresh, the state will eventually be lost. Basically, it's random if the state is saved or not.

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Please link to a test case. Likely you are hitting the cookie limit. Try using localStorage: http://datatables.net/blog/localStorage_for_state_saving

    Allan
This discussion has been closed.