For days I have been experimenting with long polling/comet implementation for my site. I got the basic idea of how it works, this is where i run some tests.
On the other hand, I have been observing(firebug) how gmail and facebook implement long polling. What I noticed with gmail is that the ajax request does not continuously follow right after the current request expires, but it waits for several seconds/minutes before it fires the next one.
I played with it some more. I tried to login with gmail account A in firefox and gmail account B in chrome. I waited when the current ajax poll finishes and then I sent an email from account B to A. I was expecting that account A won't receive it until the next poll, but to my surprise Account A directly received it right after I hit the submit button.
How does gmail do this with long polling ?
If you try to visit my site and click on the Run button and open firebug, you can see that ajax spinner is always running. when the server responds with data, it requests the server again.