Server processing - AJAX get fails
Server processing - AJAX get fails
I am certainly having a list of technical difficulties that I did not have previously on a previous setup of datatables.
When serverSide is set to false the ajax GET request works.
When serverSide is set to true, the ajax GET fails. Any ideas what might be causing this?
Answers
You are getting 404 not found. Meaning the web server couldn't find the route to the target. You will need to look at the web server logs to find out why its responding with 404 error.
A couple typical problems found on the forum:
_={timestamp}
tacked onto the URL to prevent the browser from caching the page. The web server might not understand how to handle_={timestamp}
. See the jQuery ajax docs for details. With SSP disable the Ajax request still sends the_={timestamp}
so the web server appears to process it. This might not be the issue but something to look at.Kevin
Switching the ajax to POST fixed the issue. I never realized GET had a string limitation smaller than POST. Learned something new...
The difference is GET places the parameters in the URL. POST places the parameters within the payload of the request, not part of the URL.
Kevin