[Libwebsockets] Firefox Websockets

Jack Mitchell ml at communistcode.co.uk
Sat May 18 10:36:14 CEST 2013

On 05/18/13 00:45, "Andy Green (林安廸)" wrote:
> On 17/05/13 19:37, the mail apparently from Jack Mitchell included:
>> Hi,
>> I am currently having an issue where Firefox becomes out of sync with my
>> websocket messages. I have a Chrome window open and Firefox window open,
>> both on the same page, receiving exactly the same websocket messages,
>> however the Firefox window quickly becomes out of sync with the Chrome
>> window which always keeps sync. I have never seen Chrome go wrong, could
>> this be a problem with the Firefox specific implementation of 
>> websockets?
>> N.B. I can see that they're getting out of sync as my data arrives
>> periodically on the second, so it makes it easy to spot.
> I don't really know what the issue is.... I assume your libwebsockets 
> app prints something when sending and Chrome updates promptly compared 
> to that priting, while Firefox lags more as time goes by.
> It sounds like a firefox problem.
> If you're using Canvas, I also have an application that spams the 
> canas at high frame rate that works great on Chrome, and Firefox can't 
> keep up.  It's not a websocket problem but Firefox getting its ass 
> kicked by Chrome as a browser problem.  Maybe your thing is the same.
> The other possibility is it's the way your code is that it doesn' 
> actually send the update asynchronously every second, or the socket 
> gets blocked and delays send.  But if you're printing when you send to 
> firefox from your app and it's still lagging in firefox UI...
> -Andy

Hi Andy,

Yes, the page does use a canvas element. It does strike me a bit as a 
firefox problem, as it seems to catch back up after a while so it's like 
internal firefox buffer is becoming clogged. I know it's not the buffer 
on my end as if I have one firefox and one chrome, the firefox sometimes 
gets out of sync, however if I then open another 10 chrome pages while 
the firefox one is out of sync, they all stay perfectly in time with no 
issues; while the firefox one is still wrong! The message rate isn't 
that high though, possibly 4 messages of 200 bytes and one of 1kb on the 

I might see if I can go nag mozilla. See what they have to say about it.


More information about the Libwebsockets mailing list