title: IIS preload application
body: <p>I have followed the steps here: <a href="https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-application-initialization" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-application-initialization</a> to preload my IIS application, which works well, but my question is how can I refresh the browser after IIS has finished compiling and is ready to serve application?</p>
  
  <p>Specifically on that page referred above it states: <strong>You can continure refreshing the page in your wb browser and observe that about eight seconds later (simulated with a thread sleep in the sample application's global.asax) you receive the "real" content for default.aspx with a white background.</strong></p>
  
  <p>I would like to simulate that thread sleep and refresh automagically when IIS is finished and ready. I do not want my user to have to continually refresh the page. I want to just serve the application when finished through a thread sleep.</p>
  
  <p>--UPDATE--</p>
  
  <p>I have tried to implement @rene comment, however the splash page that is served by IIS seems like a 'parsed' version of index.html, and I am unable to load any external javascript/css that is located within the application which then forces me to use a cdn for jQuery/Bootstrap/etc.</p>
  
  <p>Example Html Splash page</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=11"&gt;
      &lt;title&gt;FamLink - Pro&lt;/title&gt;
      &lt;!--CONTENT FROM APPLICATION WILL NOT BE SERVED--&gt;
      &lt;!--&lt;link href="/App/Content/bootstrap.min.css" rel="stylesheet" /&gt;
      &lt;script src="/App/Scripts/jquery-3.2.1.min.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="/App/Scripts/bootstrap.min.js" type="text/javascript"&gt;&lt;/script&gt;--&gt;
  
      &lt;!--CONTENT FROM CDN IS SERVED--&gt;
      &lt;!--&lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"&gt;
      &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"&gt;&lt;/script&gt; 
      &lt;script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.0.min.js"&gt;&lt;/script&gt;--&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h1&gt;Please wait while application is loading....&lt;/h1&gt;
      &lt;!--DOES NOT WORK (receive a 404)--&gt; 
      &lt;img src="Content/Images/468.gif" /&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>My web.config section</p>
  
  <pre><code>&lt;system.webServer&gt;
   &lt;applicationInitialization
         remapManagedRequestsTo="index.html"
         skipManagedModules="true" &gt;
        &lt;add initializationPage="/App" /&gt;
      &lt;/applicationInitialization&gt;    
  &lt;/system.webServer&gt;
  </code></pre>
  
  <p>My applicationHost.config section</p>
  
  <pre><code>&lt;applicationPools&gt;
   &lt;add name="MainNode" autoStart="true" managedRuntimeVersion="v4.0" startMode="AlwaysRunning"&gt;
                  &lt;processModel identityType="SpecificUser" userName="*****" password="****" idleTimeout="00:00:00" /&gt;
              &lt;/add&gt;
  &lt;/applicationPools&gt;
  
  &lt;sites&gt;
  &lt;site name="MainNode" id="7" serverAutoStart="true"&gt;
                  &lt;application path="/App" applicationPool="MainNodeAppPool" preloadEnabled="true"&gt;
                      &lt;virtualDirectory path="/" physicalPath="C:\inetpub\sites\MainNode" /&gt;
                  &lt;/application&gt;
  &lt;/site&gt;
  &lt;/sites&gt;
  </code></pre>
  
  <p>Is anyone else trying to implement this solution? and if so how to accomplish my task? Thanks in advance.</p>