Preloader wont ignore websocket - pace js

半世苍凉 提交于 2019-12-01 01:02:23

问题


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?


回答1:


I tried this one, it worked. :)

Pace.options.ajax.trackWebSockets = false;


来源:https://stackoverflow.com/questions/33342595/preloader-wont-ignore-websocket-pace-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!