5 ms·
Well that's a stupid way to handle it... keep the socket open... read about Comet. http://en.wikipedia.org/wiki/Comet_ http://en.wikipedia.org/wiki/Comet_(progr
by marcus 18y ago
Well that's a stupid way to handle it... keep the socket open... read about Comet. http://en.wikipedia.org/wiki/Comet_ http://en.wikipedia.org/wiki/Comet_(programming)
- axod 18y agoAre you being sarcastic? Does anyone know what comet is? Please explain exactly how you can SEND multiple packets over time from browser to server without sending more HTTP requests, and without using any java applet/flash. It's a shame people seem to have started saying "use comet" without understanding what it means. Did you read that link?
- abacad 18y agoConnection: Keep-Alive
- lacker 18y agoWithout any java applets or flash?
- axod 18y agoYes, you can specify keep-alive (Although some browsers refuse to do it in an XHR - Opera for one). However, you still send the full glut of HTTP headers every single request.
- marcus 18y agoTrue, you still need the headers, what you don't need is a new connection every key stroke. Establishing a new TCP connection is a relatively high cost network item (between all the Acks and Syns you need 3 messages have to go back and forth for it to establish), keep the connection alive, the stuff will run a lot faster.
- blasdel 18y agoYou can null out the default headers on a XHR so they don't get sent.