Jump to content

Chat Script Logic Help


jjacquay712

Recommended Posts

I was looking a few chat scripts and was wondering how logic works behind them. I have a Firefox add on called live HTTP headers that lets me view the HTTP requests sent to the server. When I look at the headers being sent by the JavaScript in the chat application it only updates the chat when it needs to. How do they achieve this? The only way I could think of doing this is to periodically send a request (every second or so) to the server to see if the other user has sent a message, then update the page. But on the chat applications I have seen it's like the server tells the client when to request an update. Does anyone know how to do this?

 

                        Thanks, John

Link to comment
https://forums.phpfreaks.com/topic/155925-chat-script-logic-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.