Frage

In my website there is messaging system, in which i want to show realtime popup when a message is received by a user.

There is table in database in which messages are stored when a user receives a message a new row will be inserted with that user id in database.

Currently i have done with ajax timer.

How can i do it with comet ajax or is there any other technology or any example programs?

War es hilfreich?

Lösung

You may take a look at SignalR which is designed for those kind of scenarios. Contrary to continuous polling with AJAX it uses PUSH technique where the server can send data to the client. In modern browsers that support HTML5, WebSockets are used to achieve that.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top