Hey all!
I was reading this example http://blog.perplexedlabs.com/2009/05/0 ... g-polling/ that explains what ajax long polling is and a simple means to implement it. Based on that reading though I have a question. If the script on the server side does not find any new data to send back to the client, it terminates after 30 seconds. If the client does not receive a callback how does it know to close and re-open the connection? Thanks!
- slick1537
Need this ajax long polling example explained
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Need this ajax long polling example explained
I think the idea with long-polling is that the server does not close the connection but keeps sending data as it is available on the same connection. The client waits for data on the same connection. The problem is that the webserver needs to be configured to support a large number of simultaneous connections.
(#10850)