Multiple choice technology web technology

XMLHttp object's use AJAX to

  1. Interact with XML

  2. Sent request to client and get the request from server

  3. Both 1 & 2

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
AI explanation

The XMLHttpRequest (XHR) object is the browser API underlying AJAX. It serves two purposes relevant to the option text: (1) it can be used to interact with XML (and other formats) returned by a server — e.g. via responseXML — and (2) it is the mechanism by which the client sends an HTTP request to the server and receives the server's response asynchronously, without a full page reload. Despite option 2's garbled phrasing ('sent request to client and get the request from server' instead of 'send request to server and get response from server'), the intended textbook meaning is the standard client→server request / server→client response cycle that XHR performs. Since XHR does both — interacts with XML-formatted data AND handles the request/response exchange — 'Both 1 & 2' is the standard correct answer in essentially every AJAX/XHR reference and quiz bank.