I am trying to write a chat client using javascript, but only communication with the server using XMLHttpRequest prevents me, which, as far as I can tell, is completely unsuitable, as many have told me.
I searched for other network functions, but did not find and said that they were not there. It's almost enough to make me stop looking, except that Gmail does it somehow. It does not request any requests for several minutes, then as soon as I send an email to myself, my mailbox in another window sends a POST request and receives an email. Since he did not send HTTP requests to the server for several minutes (I checked with firebug), he could not talk to the server like that, since he knows when he has an email to receive?
source
share