title: my loader not working while getting file via window.location.href
body: <p>I'm downloading a file via <code>window.location.href = '..path to server get method which returns file'</code></p>
  
  <p>Here is my code on button click,</p>
  
  <pre class="lang-js prettyprint-override"><code>$(document)
              .off('click', '#btnExportToExcel')
              .on('click', '#btnExportToExcel',
                  function (e) {
                      e.preventDefault();
  
                      indicatorStart('Loading');
                      window.location.href = '/Index/ExcelReport';
                      indicatorStop();
                      });
  </code></pre>
  
  <p>Here is my <code>indicatorStart()</code> and <code>indicatorStop()</code>,</p>
  
  <pre class="lang-js prettyprint-override"><code>function indicatorStart(text) {
      const $loader = $($.parseHTML(`&lt;div id="loader" class="fade show"&gt;
                                          &lt;div id="loader-message" role="alert"&gt;${text}&lt;/div&gt;
                                       &lt;/div&gt;`));
  
      $('.page-content').append($loader);
  }
  
  function indicatorStop() {
      $('#loader').remove();
  }
  </code></pre>
  
  <p>loader works when I hook this method inside ajax lifecycle but not under normal get. Only file is getting downloaded correctly. Please assist on where I'm going wrong.</p>