Jump to content

XML - Managing Data Exchange/XMLHTTP

From Wikibooks, open books for an open world



Previous Chapter Next Chapter
Web Services Database and XML



History

[edit | edit source]

The XMLHttpRequest object enables JavaScript to make HTTP requests to a remote server without the need to reload the page. It was first implemented by Microsoft as an ActiveX object but is now available as a native object within both Mozilla and Apple's Safari browser. Javascript is used to transfer information back to the server in real time where it can be processed by the server, and then returned instantaneously to the user.

Purpose

[edit | edit source]

The main function of the XMLHttpRequest object is that it provides an easy way for webpages to receive updated information from servers without having to refresh the whole webpage. As a result, the webserver’s processing load is reduced and the user receives information faster without seeing any interruptions in service.

Future Application

[edit | edit source]

The XMLHttpRequest object has many improvements over the existing data exchange methods. Many developers still rely on Common Gateway Interchange (CGI) for data exchange. Since CGI has no adequate restriction about the format of data, XML usage is relatively pointless from a data exchange standpoint. Utilizing the inherent abilities of XMLHttp will remove the inadequacies originating from the widespread use of CGI. The XMLHttpRequest object provides a more adequate approach for real-time content delivery than existing development methods.

Tutorials

[edit | edit source]

http://developer.apple.com/library/safari/#documentation/appleapplications/Conceptual/SafariJSProgTopics/Articles/XHR.html