Chapter 3.
There are two main ways you can use the data you receive from XMLHttpRequest
or one of the fallback methods: the document-centric approach and remote scripting. In this chapter, we look at different ways to implement these techniques and use the data we learned to send in the previous chapter.
Document-Centric Approaches
A document-centric approach to AJAX simply means that your main interaction with the server is pulling down pages of content. This doesn’t mean that the pages aren’t dynamically generated, but it does mean you’re pulling down the content in a ready-to-use or parse format. The simplest use case is to download a chunk of HTML from your server and insert it into the page using innerHTML
.
The biggest differentiator between ...
Get Understanding AJAX: Consuming the Sent Data with XML and JSON now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.