2

I have included pace.js on my html page to show default progress bar. After reloading page progress bar remains for more than 2-3 mins. When I had look at developer tool I found that pace.min.js is making request of type 'websocket'.

My question is :

  1. Why Pace.js making socket connection request to local host? ( Please see below image )
  2. How to solve this issue?

enter image description here

user2243747
  • 2,767
  • 6
  • 41
  • 61
  • I have tried https://stackoverflow.com/questions/33342595/preloader-wont-ignore-websocket-pace-js solution, but not working. Still having same issue. – user2243747 Jun 06 '17 at 10:25
  • so you are including pace.js and pace.css provided by pace website? can you update your question with your code – moein rahimi Jun 06 '17 at 10:36
  • @moeinrahimi, thanks for your response. Actually I have downloaded a template from http://www.styleshout.com/free-templates/dazzle/ and I am trying to integrate it in Umbraco site. I tried to create a stand alone web app to reproduce this issue but I was not able to reproduce. Now will look into the template and will try to figure it out why pace.js is trying to open a websocket. Cheers – user2243747 Jun 06 '17 at 11:09
  • I have tested dazzle template and pace is working just fine, maybe it's related to your cms or how you are linking pace – moein rahimi Jun 06 '17 at 12:12

1 Answers1

0

Make sure you add something like this:

 <script>
      window.paceOptions = {
          ajax: {
              ignoreURLs: ['signalr', '__browserLink', 'browserLinkSignalR'],
              trackWebSockets: false
          }
      };
  </script>

before you load the pace.js script. It worked for me.

hug
  • 1,169
  • 10
  • 7