Pace.js waiting for 101 Switching Protocols

568 Views Asked by At

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

1

There are 1 best solutions below

1
hug On

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.