Pergunta

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?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top