Datatables Ajax Reload Set Cookies

Datatables Ajax Reload Set Cookies

geraldcsoftwaregeraldcsoftware Posts: 1Questions: 1Answers: 0

I am using DataTables with an ajax source.

var table = $('#myTable').DatatTable({ ajax: { url: myInitialUrl }....});

The first api call loads fine, setting the authentication cookie properly (cookie would have been already on the browser at the point of showing this page).

At some point I am going to update the Url in order to update the search parameters.

table.ajax.url(myUpdatedUrl).load();

The api call that is happening at this point lacks the authentication cookie, and will subsequently result in an 401 error.

Is there a way to fix this behaviour?

Answers

  • allanallan Posts: 63,678Questions: 1Answers: 10,498 Site admin

    How are you currently setting the auth cookie? The ajax call will normally just include it automatically (unless it has timed out). Can you link to a page showing the issue please?

    Allan

Sign In or Register to comment.