Detect JQuery AJAX Requests with PHP
02 Sep 2016When you make a AJAX call to the server using JQuery, it adds a special header along with the request.
So you can check on the server side against this header.
If the header HTTP_X_REQUESTED_WITH is present and is equal to XMLHttpRequest, then the AJAX call is made via jQuery.