I added preloader to my website which runs with ruby on rails, it seems it works perfectly, but because of pusher websockets, preloader does not end, it waits all the time,
I tried this one, it worked. :)
Pace.options.ajax.trackWebSockets = false;