Delete cookies

Delete cookies

faszynskifaszynski Posts: 11Questions: 0Answers: 0
edited November 2012 in General
I have code:

[code]
function DataTable() {
$('#displayData').dataTable( {
"bProcessing": true,
"bServerSide": true,
"bStateSave": true,
"bSort": false,
"bFilter": false,
"aoColumns": [
{ "mDataProp": "name" }
],
"fnServerData": function ( sSource, aoData, fnCallback, oSettings ) {
oSettings.jqXHR = req.query('GET', url, aoData, function(responseServer, status, xhr) {
json = responseServer.dataListCustomer;
if ( json.sError ) {
oSettings.oApi._fnLog( oSettings, 0, json.sError );
}

$(oSettings.oInstance).trigger('xhr', [oSettings, json]);
fnCallback( json );
//HERE
}, function(jqXHR, textStatus, errorThrown) {
var exception;
exception = jQuery.parseJSON(jqXHR.responseText);
return showError(exception);
});
}
} );
}
[/code]

Where is HERE I want delete cookies which dataTable saved, how can I do that?

Replies

  • allanallan Posts: 63,532Questions: 1Answers: 10,475 Site admin
    Easiest way is to use localStorage and just nuke that - http://datatables.net/blog/localStorage_for_state_saving . Unless you need IE6/7 support I'd suggest forgetting cookie (DataTables 1.10 is going to use localStorage by default).

    Allan
This discussion has been closed.