MacRumors has a live ticker of the WWDC Keynote going that makes a nice use of AJAX.
At prior Apple keynotes, MacRumors and others would update a web page as new slides at the Keynote went by. With no live video or audio feed, this was all the information junkies had. The internet at large would come to this page and read over the list of features, and then refresh the page until something new showed up. This would quickly kill the web servers, and no one could find out what they were supposed to buy.
Then, the baby jesus would cry.
This year MacRumors is using an AJAX call to insert the new chunks of information into the page at regular one minute intervals. From a developer/publisher standpoint, this is good because
- You throttle the requests to your webserver. Sure, a user could still refresh the page more than once a minute, but few are likely to do so when they know that new information is just a minute away
- When the information is sent back to the end user, it’s a small bit of XML that contains only the updated items. Instead of sending back a 30kb page each time, you send back a 2kb XML file. You also avoid having to resend any assets (images, CSS files, Javascript files) that refreshing the main page might trigger. This is a huge advantage when you’re trying to build something that’s going to scale.
Both of these make for a much happier server, which makes for a much happier user experience. There’s more info on the solution at the MacRumors site itself.