Hi Henrik and Alex, Henrik Sarvell <[email protected]> writes: > Hi Alex, doesn't all that polling you're doing introduce a lot of > unnecessary requests to the server. > > There can be up to 200 persons logged in at the same time at the site > where I'm using websockets now, that would be 100 HTTP POSTS per > second with full HTTP headers etc just to check for notifications that > perhaps 1 or 2 of them would get per 10 seconds.
that is a good point. However, is 100 requests per second really a problem? I am not familiar with your use-case, but if it is a chat thing like the example from Alex, then the amount of work on the server seems rather small and avoiding sending HTTP headers seems like pointless micro-optimization. > On Mon, Jul 14, 2014 at 2:44 PM, Alexander Burger <[email protected]> > wrote: >> To keep with the typical "realtime chat", a minimal setup could be: [...] >> Note that also text browsers like w3m can be used. Just the automatic >> firing of the button won't happen without JavaScript, so the user must >> press the "Chat" button whenever he wants an update. Also note that due >> to the same-origin-policy of JavaScrpt (repeatedly discussed here) the >> "Chat" buttun must be pressed in the beginning once, unless - as usually >> recommended - 'httpGate' is running and the client connected directly to >> "http://localhost". What about putting the log field into an iframe with automatic reload instead of the +Auto button which needs javascript? Would that not be even better? Cheers, Tomas -- UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe
