title: Initial form request / redirect show page loading
body: <p>I am working on an asp.net web form project which has a site.master page as well as other aspx pages that use the site master.</p>
  
  <p>I have a div on the site master as such:</p>
  
  <pre><code>&lt;div id="msg" class="dialog"&gt;loading, please wait...&lt;/div&gt;
  </code></pre>
  
  <p>Full context of it (the site master) is as such (note im keeping it simple here):</p>
  
  <pre><code>&lt;body id="pageContainer"&gt;
      &lt;div id="msg" class="dialog"&gt;loading, please wait...&lt;/div&gt;
      &lt;div id="pageBody"&gt;
      &lt;form id="formMaster" runat="server"&gt;
      &lt;/form&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>The class=dialog is defined as such for the div:</p>
  
  <pre><code>.dialog {
      display: none;
      width: 300px;
     height: 300px;
     position: absolute;
     left: 50%;
     top: 50%; 
     margin-left: -150px;
     margin-top: -150px;
  }
  </code></pre>
  
  <p>Basically I use this when I want to display "loading please wait" across requests, and I turn it on / off via jquery:</p>
  
  <pre><code>     // Simulate some time before everything's loaded
       setTimeout(function () {
           $("#msg").fadeOut(function () {
               // Wait for #msg to fade out before fading in #pageBody
               $("#pageBody").animate({
                   opacity: "1.0"
               }, 1);
           });
       }, 1);
  </code></pre>
  
  <p>This is done inside of <code>$(document).ready()</code>.  I need to simulate some time and then I make the pageBody div visible (using the opacity property)...This seems to work fine but upon initial say hyperlink clicks / submits that redirect a user to another page the loading doesn't show up right away...it takes quite some time to show up confusing the user.</p>
  
  <p>For instance if I have a simple hyperlinked page (where that page has LOTS of database data)...The initial click of that hyperlink shows the spinning circle (in chromes tab) and then finally takes you to that page.  At that point my loading div comes up and finally that fades out and the page is shown.  I was hoping instantly my loading div can come up so that the user knows something is happening.  Most of our users are not too savvy on the web so they dont even pay attention to the browser spinning wheel, they just think the page is not responding (I dont blame them, this can be tricky).</p>
  
  <p>What can I do so that this loading, please wait... div comes up almost instantaneously?  Or even can I ?</p>