[erlang-questions] Mochiwebsockets was Re: Long polling
Fri Jul 20 09:30:15 CEST 2012
On 07/20/2012 09:16 AM, Gleb Peregud wrote:
> On Fri, Jul 20, 2012 at 9:11 AM, Loïc Hoguin <> wrote:
>> Why? I don't see any reason why SockJS would have better latency.
> Because many browsers doesn't support websockets and because streaming
> transports (xhrstreaming, htmlfile streaming, eventsource streaming,
> etc.) have better latency than long polling trasnport.
Probably different depending on the location, but I've observed
personally that browsers not able to do websockets were the minority. We
have around 70% of webkit/gecko, it's only really IE that could use
improved latency. What's the best solution for IE? I could add it to Bullet.
>> And for cross-domain, it's just a matter of sending one header.
> Because it works only in most recent browser. It doesn't work for most
> older browsers, which are, unfortunately, still in use.
> Bullet is useless in cross-domain setup in very many browsers, which
> doesn't have cross domain xhr request support.
You don't need cross-domain though, you can just include the files from
anywhere and use $.bullet(url) inside your page. Or event mylib(url)
which subsequently calls bullet. The only requirement is that the origin
comes from the same domain.
This doesn't solve calling an entirely different application you don't
control but that one's very unusual.
More information about the erlang-questions