Try adding these tags into the header of your htm page containing the chat.
<meta http-equiv="Refresh" content="7">
<meta http-equiv="Pragma" content="no-cache">
content="7" will make the page refresh automatically every 7 secs. In order to speed things up it's sometimes better to have the chat contents in their own frame with just the barest anount of html possible to speed up downloads. Also, the refreshed page is always loaded at its beginning so you need to add new messages to the top not the bottom or the user will have to scroll down to read them. AFAIK this is about all you can do if you're using html, but it does work.
The only other way I can think of is to use a java applet to prevent this reloading problem but I guess you don't want to hear that since this is a perl forum.