JavaScript/PHP Chat Part II

February 29, 2004

JavaScript/PHP Chat Part II

I've made a few changes to my chat tutorial—a bug affecting IE 5.0 has now been fixed and support for Opera 7 has been fine-tuned.

On a related note, I'd been wondering why I'd had this mysterious spike in my server logs last month—in one day I had about as many requests as I'd had over the previous month. Yet the number of visitors was about average, and the number of KB transferred wasn't too alarming.

It turns out this was the IE 5.0 bug. Apparently, someone was testing the chat in IE 5.0 and left it running for a couple hours. The bug was such that instead of pausing between server polls, the browser would send a new request the instant it received the previous response. So over the course of an afternoon, that can add up to a lot of requests. Fortunately, the chat is designed to use minimal bandwidth, so apart from this curiosity, there were no serious consequences. Although my Webalizer statistics are a little skewed—the request leader for January was the Netherlands.

Posted by jon at February 29, 2004 10:34 PM


Very nice chatscript. However I wonder if it's a known issue that if you type fast some entries get lost?

I tested with submit counting 1 to 10 starting slow and end fast.. however some numbers didn't showed up and some empty lines appeared at the end.

Maybe this issue can be solved with a "buffer" in a javascript string. I didn't took an intensive look at the script yet, so this is just a guess.


Posted by: Marco at March 22, 2004 1:53 PM

I hadn't come across that yet, but thanks for pointing it out. The buffer idea might be a good solution.

BTW, what browser were you using?

Posted by: jon at March 22, 2004 8:22 PM