sockjs/sockjs-node

200-300ms Delay after library is loaded to when first xhr call is made to sockjs url

mercuryyy opened this issue · 3 comments

Trying to fire sockjs as early as possible but there is a delay from when the library finishes and

var sockjs_url = 'url';
sockjs = new SockJS(sockjs_url);

is executed, then comes a 200-300ms delay until the first xhr call is made to the url

i intently fire the lib and code after the onload event is triggered on my pages, is there a delay set somewhere in the lib i cant figure out how to set SockJS() to fire exactly after the lib finished reading.

Did you intend to file this on the Node.js library?

No on client side.

I tried various ways but there is always a delay probably somewhere in the sockjs lib, since other scripts exec after
var sockjs_url = 'url';
sockjs = new SockJS(sockjs_url);
gets loaded to the dom before "sockjs_url"

This repo is for the Node.js library. You want https://github.com/sockjs/sockjs-client for the browser client.