10

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 at my footer,

<script>
window.paceOptions = {
    ajax: {
      trackWebSockets: false,
      ignoreURLs: [/pusher/, /heap/]
    }
  }
</script>

but it did not work. how can I solve this problem?

Yunus Hatipoglu
  • 609
  • 1
  • 6
  • 20
  • 1
    I think the problem is that you add this in the footer. I think the options need to be set before the pace.js script loads. Seems like it was the problem for me at least, but I'm using ASP.NET and SignalR though. – hug May 08 '19 at 13:15

1 Answers1

16

I tried this one, it worked. :)

Pace.options.ajax.trackWebSockets = false;
Yunus Hatipoglu
  • 609
  • 1
  • 6
  • 20