How does in-browser chat work?

前端 未结 6 729
攒了一身酷
攒了一身酷 2020-12-24 06:53

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 s

6条回答
  •  执笔经年
    2020-12-24 07:16

    Orbited is a good way to implement this, it uses comet methodologies. You can find a tutorial here.

    Someone mentioned ajax polling, but comet is always better than polling. Well, that's just a sensationalist title, but comet is definitely more appropriate and can lead to less stress on the server side, with the right back-end.

提交回复
热议问题