How Ajax Works
How Ajax Works
Ajax make use of a built in object XMLHttpRequest to perform this. This object is not a part of the DOM (Document Object Model) but is supported in all browser.
- A java script creates XMLHttpRequest object initializes it with reveleant information as necessary and send it to the server.
- The servers responds by sending the contents of a file or the output of a server side program like servlet, jsp, PHP.
- When the response arrives from the server a java script function triggered to act on the data supplied by the server.
This Java script response function typically refresh display using the Dom avoiding the requirement to be reload or refresh the entire page.
Browser Support
Most of the Morden browser support Ajax (XMLHttpRequest object).
- Google Crome
- Firefox
- Internet Explorer 7 +
- Safari
- Opera