2. HISTORY• 1995 – Java Applets• 1996 – MS IE5 IFrame• 1999/2000 – MS IE5 XMLHTTP ActiveX Control• By 2004 – Other browsers - XMLHttpRequest object• 2005 – Google made it popular through google suggest, gmail and other apps• 2006 – W3C released the first draft specification
4. Advantages• Page reload avoided to display same common content every time.• The use of asynchronous requests allows the clients Web browser UI to be more interactive and to respond quickly to inputs.• Reduce connections to the server.• State can be maintained throughout a web site.
6. XMLHttpRequest (XHR)• The open method – (type, url, async, user, password)• The setRequestHeader method – Content-Type, User-Agent, etc• The send method – Parameter content to be sent• The onreadystatechange event listener – readyState (1 for open, 2 for send, 3 for loading, 4 for complete)• The HTTP response – responseXML, responseText