ajax web chat

  • Thread starter Thread starter Tem
  • Start date Start date
T

Tem

Does anyone know how web-based chat like Gtalk in gmail works?
how come it doesn't need to constantly refresh/send a request to the server
to get new message?
other web based chat room have to constantly refresh the page (every 10 sec)
to get new messages

Tem
 
Does anyone know how web-based chat like Gtalk in gmail works?
how come it doesn't need to constantly refresh/send a request to the server
to get new message?
other web based chat room have to constantly refresh the page (every 10 sec)
to get new messages

Tem

Hi,

Nowadays, the answer is quite simple and you can emulate this behavior
using an UpdatePanel and a TimerControl from the AJAX tool kit.

Regards,

Paulo Santos
http://pjondevelopment.50webs.com
 
Does anyone know how web-based chat like Gtalk in gmail works?
how come it doesn't need to constantly refresh/send a request to the server
to get new message?
other web based chat room have to constantly refresh the page (every 10 sec)
to get new messages

Tem

With the chat app that I did I used a hidden IFrame that refreshed
every second and if it had a new message it posted it to your screen,
but I also had to do it entirely in ASP (not ASP.NET). If I were to
redo it I would probably have used AJAX controls or Web Services.
 
actually it does. it uses an iframe and server push instead of polling
the server for updates. it then uses dhtml to update the display. as
this ties up a connection, you would have trouble doing this with
asp.net and a lot of users.

-- bruce (sqlwork.com)
 
Could you explain "server push instead of polling
the server for updates"

I thought the client has to submit a request first to get a response from
the server

Thanks
Tem
 
Back
Top