PDA

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



sulbha
08-10-2017, 06:42 AM
Why do we use the XMLHttpRequest object in AJAX?

Barbara
08-31-2017, 08:09 AM
The XMLHttpRequest object is the key to AJAX. XMLHttpRequest (XHR) is an API that can be used by JavaScript, JScript, VBScript, and other web browser scripting languages to transfer and manipulate XML data to and from a webserver using HTTP, establishing an independent connection channel between a webpage's Client-Side and Server-Side. The data returned from XMLHttpRequest calls will often be provided by back-end databases. Besides XML, XMLHttpRequest can be used to fetch data in other formats, e.g. JSON or even plain text.