What are differences between XMLHttpRequest and HttpRequest
问题 In Zend Framework and other framework such as Symfony, there is a method named isXMLHttpRequest() to determine this is XMLHttpRequest or not. I wonder that how can framework or PHP distinguish between XmlHttpRequest and HttpRequest? if($this->_request->isXmlHttpRequest()) { //code here } 回答1: From the documentation: Zend_Controller_Request_Http has a rudimentary method for detecting AJAX requests: isXmlHttpRequest(). This method looks for an HTTP request header X-Requested-With with the value