YulongW
3/3/2014 - 3:24 PM

Detect an AJAX request

Detect an AJAX request

public static boolean isAjax(request) {
  return "XMLHttpRequest".equals(request.getHeader("X-Requested-With"));
}