9.4. Summary

In this chapter, you learned about Comet, a push architecture for web applications. Instead of using Ajax techniques such as polling to get updated data, the information is pushed out to the client via HTTP streaming—a continuous connection with the server that pushes out data periodically. You learned how to implement HTTP streaming solutions using Internet Explorer, Firefox, and LiveConnect.

Next, you learned about server-sent DOM events, part of the Web Applications 1.0 specification published by the Web Hypertext Application Technology Working Group (WHATWG). This technology allows the server to fire DOM events, such as click, mouseover, and keydown, as well as custom events that developers can subscribe to using the <event-source/> element. You learned how to use this technology in Opera.

You then were introduced to some basic concepts of connection management. The two-connection limit of HTTP 1.1 was discussed in relation to Ajax and Comet, and you learned that using a subdomain for a Comet connection is preferable because it still leaves two connections available to the main domain for other Ajax requests.

Last, you learned about several server-side solutions for implementing Comet. Since Comet puts more stress on traditional web application servers, it's preferable to use a system designed specifically for HTTP streaming.

Get Professional Ajax, 2nd Edition 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.