Hi I wanna make a website preferably using asp.net 3.5 in c#. In this web app, I need to push messages very frequently. (like if sender sends a message, it should immediately reflect to the receivers). So more like chat application but not bidirectional.
My question is how can i refresh receivers webpage immediately?
or How can i push message to the receivers immediately?
any help is highly appreciated?
I’m guessing you’re talking about features like Facebook Chat. According to various facebook dev blog posts, I believe they use ajax to make a long polled request; meaning as soon as one user sends a message, theres another ajax request made which isn’t responded to by the server until there’s something to report (i.e. a new message). This is often called “Comet”.
Note: do NOT attempt to do this on a standard server setup – most server software starts a new thread for each request. You’ll need custom server software to avoid this. Unfortunately, I’ve searched for hours in the past and can’t find a definitive answer to which software accomplishes this best.