Preloader不会忽略websocket - pace js

时间:2022-02-15 21:13:19

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,

我在我的网站上添加了预加载器,它在轨道上使用ruby运行,看起来效果很好,但由于推送的websockets,预加载器没有结束,它一直等待,我试着在我的页脚,

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

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

但它不起作用。我怎么解决这个问题?

1 个解决方案

#1


11  

I tried this one, it worked. :)

我试过这个,它奏效了。 :)

Pace.options.ajax.trackWebSockets = false;

#1


11  

I tried this one, it worked. :)

我试过这个,它奏效了。 :)

Pace.options.ajax.trackWebSockets = false;