Just curious. How exactly does chatting in a browser work? Usually if a user goes to a web page, his/her webbrowser requests the page content. A server produces output and sends it to the user's computer. But with chatting it's a little bit the other way around (well not exactly). It's not the user requesting a chat message from some server, but rather the server that sends it directly. Now this is really simple to achieve with a "normal" server, but the thing that the server sends it to a browser directly confuses me. The posting the message part is all clear, it's simple. You just post the data to the server with for example ajax or something. But how does the other computer instantly "know" that a message has been written to it? It must obviously be the server sending it to the other computer as soon as it has been written. But somehow that doesn't compute in my brain. In my brain, the browser only request things, it doesn't just get them. How exactly do you do that?
Take google talk in gmail for example. How does that work? How is it implemented?
Live chat is a form of customer messaging software that allows customers to speak directly with a company's representatives — usually those in customer service and technical support and other roles. Live chat is a messaging system for business which works as a pop-up chat window within a company's website.
When using chat features, your messages are sent over Wi-Fi and mobile data. As long as you're connected to a Wi-Fi network that you don't have to pay to use, there should be no cost to send and receive messages. If your messages are sent using mobile data, the cost is based on your mobile data plan.
There are some push technologies, such as Comet, but they're not widely implemented. Most of the time this is accomplished via polling at some small interval with AJAX and downloading any new messages that are available since the last downloaded message.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With