I've designed a PHP based chat using mysql tables for database storage, but the obvious problem is that PHP has no obvious way to control the browser like JS does. I'm wondering, are there functions hidden in the depths of PHP which can do generally what JS can do? The main thing I want to do is be able to have the chat update the page only if there are new messages. Currently, it reprocesses which messages it needs to show for each user, every 4 seconds (with a meta refresh tag), which wastes bandwidth and causes annoying side effects which aren't necessary for a chat. While loops don't work for active pages, because they prevent the processing of other pages if you're using frames (I am). I want to avoid JS mainly because the majority of my users are FF users, not IE users, and a good portion of them may disable JS. I've read about the COM object in PHP, which I think allows you to do what JS does, but only for IE. I've also heard of XPCOM for Firefox, but PHP doesn't appear to have any extensions to utilize it. And that still doesn't allow for the near universal acceptance that PHP does. If anyone knows a way to get around these problems with PHP (or some other language which is widely accepted for web pages), it'd be great if you could tell me about them.