最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Preloader wont ignore websocket - pace js - Stack Overflow

programmeradmin1浏览0评论

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?

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?

Share Improve this question edited May 21, 2016 at 21:03 Yunus Hatipoglu asked Oct 26, 2015 at 9:43 Yunus HatipogluYunus Hatipoglu 6091 gold badge6 silver badges20 bronze badges 1
  • 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 Commented May 8, 2019 at 13:15
Add a ment  | 

1 Answer 1

Reset to default 16

I tried this one, it worked. :)

Pace.options.ajax.trackWebSockets = false;
发布评论

评论列表(0)

  1. 暂无评论