View Full Version : Why do we use the XMLHttpRequest object in AJAX?

08-09-2017, 10:53 PM
Why do we use the XMLHttpRequest object in AJAX?

08-09-2017, 11:36 PM
Javascript uses the XMLHttpRequest object to manipulate XML and other text data between client and server.
- AJAX applications use the XMLHttpRequest object to avoid the postback of entire page when the browser is communicating with server.
- The XMLHttpRequest object enables a client-side script to execute an HTTP request.
- For this functionality MSXML ActiveX component is used in earlier version of Internet Explorer. While, XMLHttpRequest is used in Internet Explorer 7 and other browsers, such as Mozilla, Firefox.

08-10-2017, 05:23 PM
Because java script can understand XML requests and commands. Usage of java is not possible in all web applications so it is easy to execute XML requests which can be processed by jquery.