Ajax is fundamentally a simple three-step process:
- Handle the URL on the server and write to the response.
- After the response is complete, integrate the response into the DOM.
Those steps are almost identical to what JSF does when you click a link that illicits a request. JSF handles that request on the server by ultimately writing to the response, which overwrites the preceding response.
The same applies for Ajax requests, except for the last step. In an Ajax request, we don’t refresh the entire page; instead, we update only part of the page. That subtle difference lets us perform all kinds of interesting interactions that were heretofore unheard of in Web applications.