Why do we use the XMLHttpRequest object in AJAX?
Printable View
Why do we use the XMLHttpRequest object in AJAX?
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.
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.