Online chat tool on

Written by Adrian Holovaty on December 18, 2002

My first project at my new job debuts Wednesday afternoon. It's a Web-based chat application that simulates a dynamically-updated, real-time chat room -- without using Flash, Java or clunky meta tags. It uses a combination of JavaScript DOM tricks and server-side programming to make dynamic updates.

Most Web-based chat applications, such as's Live Online chats, use meta auto-refresh tags to give the illusion of continual updating. Those are easy to implement (a single line of code in your page will do the trick), but they carry major baggage: Every time the page refreshes, the browser must reload the entire page from scratch. Of course, in a chat setting, user-generated content doesn't change; rather, more content keeps being generated. In other words, it's redundant to reload an entire chat if you know none of the text has changed; it's much more efficient to load only the newest stuff.

And that's precisely how the new / chat system works. When you join a chat, it'll load all the messages posted up to that point. From then on, JavaScript will make frequent remote calls to the server to check whether any new messages have been posted. Your browser will only have to download a message if you haven't downloaded it already.

It's a lot like Glen Murphy's dchat, which was my inspiration, but there are a number of differences -- namely, chats on will be moderated. (An editor will OK each comment.) Also, the JavaScript degrades cleanly into a meta-refresh page for browser that can't handle modern JavaScript techniques.

The first chat we've got scheduled is Wednesday (today) at 3:30 PM U.S. Central Time. The chat guests are four of the Women of KU (a group of calendar models that our Web site sponsors). Should be an interesting conversation. Check it out, if you've got a chance. It'll be linked off of


Posted by Dan Martin on December 19, 2002, at 12:52 a.m.:

I have to say you did a terrific job with the chat. In the past I haven't seen HTML chat turn out too well.

Posted by Adrian on December 19, 2002, at 1:44 a.m.:

Thanks, Dan! The chat was a smashing success. Can't wait until the next one. The transcript is available for anyone who's interested.

Comments have been turned off for this page.