Jelix\Routing\ClientRequest::isAjax PHP Method

isAjax() public method

says if this is an ajax request
Since: 1.3a1
public isAjax ( ) : boolean
return boolean true if it is an ajax request
    function isAjax()
    {
        if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) {
            return $_SERVER['HTTP_X_REQUESTED_WITH'] === "XMLHttpRequest";
        } else {
            return false;
        }
    }