Version: v0.7.0 - Beta.  We welcome contributors & feedback.

Request.isAjax

Request.isAjax() -> boolean

Description

Return true if the current request was made as an XmlHttpRequest (i.e. client-side AJAX).

// e.g. Handling a $.ajax() call from jQuery.
if Request.isAjax() {
    Output.sendJson({ status: 'ok' })
}

See Also