Using the XMLHttpRequest Object
XMLHttpRequest
is the object that enables the JavaScript code to make asynchronous HTTP server requests. This functionality allows you to make HTTP requests, receive responses, and update parts of the page completely in the background, without the user experiencing any visual interruptions. This is very important because one can keep the user interface responsive while interrogating the server for data.
The XMLHttpRequest
object was initially implemented by Microsoft in 1999 as an ActiveX object in Internet Explorer, and eventually became de facto standard for all the browsers, being supported as a native object by all modern web browsers except Internet Explorer 6.
Note
Note that even if XMLHttpRequest
has become a de facto standard in the web browsers, it is not a W3C standard. Similar functionality is proposed by the W3C DOM Level 3 Load and Save specification standard, which hasn’t been implemented yet by web browsers.
The typical sequence of operations...