---
title: "Why do we use the XMLHttpRequest object in AJAX?"  
description: "Why do we use the XMLHttpRequest object in AJAX?"  
author: "Sumit Kesarwani"  
published: 2014-09-02  
updated: 2020-09-16  
canonical: https://www.mindstick.com/interview/2117/why-do-we-use-the-xmlhttprequest-object-in-ajax  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# Why do we use the XMLHttpRequest object in AJAX?

The XMLHttpRequest object is used by JavaScript to transfer XML and other text data between client and server. The XMLHttpRequest object allows a client-side script to perform an HTTP request. AJAX applications use the XMLHttpRequest object so that the browser can communicate to the server without requiring a postback of the entire page. In earlier versions of Internet Explorer, MSXML ActiveX component is liable to provide this functionality; whereas, Internet Explorer 7 and other browsers, such as Mozilla Firefox, XMLHttpRequest is not liable to.

## Answers

### Answer by Sumit Kesarwani

The XMLHttpRequest object is used by JavaScript to transfer XML and other text data between client and server. The XMLHttpRequest object allows a client-side script to perform an HTTP request. AJAX applications use the XMLHttpRequest object so that the browser can communicate to the server without requiring a postback of the entire page. In earlier versions of Internet Explorer, MSXML ActiveX component is liable to provide this functionality; whereas, Internet Explorer 7 and other browsers, such as Mozilla Firefox, XMLHttpRequest is not liable to.


---

Original Source: https://www.mindstick.com/interview/2117/why-do-we-use-the-xmlhttprequest-object-in-ajax

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
