Chapter 13. Streaming Data with Ajax and Comet

In Chapter 12, Abstracting Browser Differences: Ajax, we saw how the XMLHttpRequest object enables web pages to take the role of interactive applications that can both update data on the back-end server by issuing POST requests, as well as incrementally update the page without reloading it using GET requests.

In this chapter we will take a look at technologies used to implement live data streaming between the server and client. This concept was first enabled by Netscape’s Server Push in 1995, and is possible to implement in a variety of ways in today’s browsers under umbrella terms such as Comet, Reverse Ajax, and Ajax Push. We will look into two implementations in this chapter; regular polling ...

Get Test-Driven JavaScript Development 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.