A Detailed Explanation of the XMLHttpRequest Object
The XMLHttpRequest object is at the technological root of all AJAX and Web 2.0 applications. Although software vendors and the open source community now supply many AJAX frameworks that simplify using the XMLHttpRequest object, it's still worth your time to know the fundamentals.
by Deepak Vohra
November 7, 2006
synchronous JavaScript and XML (AJAX ) is a term for the process of transferring data between a client script and the server. The advantage of this is that it provides developers with a way to retrieve content from a Web server without posting the page the user is currently viewing to the server. In concert with modern browsers' ability to dynamically change displayed content through programming code (JavaScript) that accesses the browser's DOM, AJAX lets developers update the HTML content displayed in the browser without refreshing the page. In other words, AJAX can make browser-based applications more interactive, more responsive, and more like traditional desktop applications.
Google's Gmail and Outlook Express are two familiar examples that use AJAX techniques. AJAX may be used with any client-side scripting language, including JavaScript, JScript, and VBScript.
AJAX takes advantage of an object built into all modern browsers-the XMLHttpRequest objectto send and receive HTTP requests and responses. An HTTP request sent via the XMLHttpRequest object does not require the page to have or post a <form> element. The 'A' in AJAX stands for "asynchronous," which means that the XMLHttpRequest object's send() method returns immediately, letting the browser processing of other HTML/JavaScript on the Web page continue while the server processes the HTTP request and sends the response. While asynchronous requests are the default, you can optionally send synchronous requests, which halts other Web page processing until the page receives the server's response.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!