Is it an Ajax request:
ublic static boolean isAjaxRequest(HttpServletRequest request){ String accept = request.getHeader("accept"); String xRequestedWith = request.getHeader("X-Requested-With"); // If it is an asynchronous request or a mobile phone, return the information directly return ((accept != null && accept.indexOf("application/json") != -1 || (xRequestedWith != null && xRequestedWith.indexOf("XMLHttpRequest") != -1) )); }
Here, the parameter request is judged,
We