I am creating a chat application that works with a long poll to emulate push from server to client.
Basically, the browser asks for updates, and I respond if there is something new. Otherwise, I keep the connection open without responding until something appears that needs to be sent back.
Now, if 30 seconds have passed and I didn’t send anything, I send a response, saying mostly “NoNews”, and the client will poll again.
What I want to do, obviously, supports this unanswered connection for as long as possible before the browser just shuts down and surrenders to me ... I did not find any good documentation about client timeout for each browser, and this does not look like the same for all of them ...
Have any of you applied for a lengthy survey?
Any ideas what could be the longest secure timeout?
Thanks!
source
share