AJAX - The Complete Reference

(avery) #1

518 Part III: Advanced Topics


Polling: Fast or Long

The polling pattern may not be graceful, but it is effective in a brute force manner. Using a
timer or interval we can simply repoll the server for data.

If the polling frequency is fast enough, it can give a sense of immediate data availability
(see http://ajaxref.com/ch10/poll.html). However, if little activity occurs, you end up issuing

FIGURE 10-9 Many different approaches to Comet or push-style communication
Free download pdf