title: IIS and Static content?
body: <p>According to <a href="https://books.google.com/books?id=aIs8drBVdaoC&amp;lpg=PA63&amp;ots=BMvOxuwGIm&amp;dq=%22Files%20that%20the%20browser%20retrieves%20from%20the%20server%20should%20be%20stored%20in%20the%20browser%E2%80%99s%20cache%20as%20long%20as%20possible%20to%20help%20minimize%20server%20round-trips.%22&amp;pg=PA63&amp;redir_esc=y#v=onepage&amp;q=%22Files%20that%20the%20browser%20retrieves%20from%20the%20server%20should%20be%20stored%20in%20the%20browser%E2%80%99s%20cache%20as%20long%20as%20possible%20to%20help%20minimize%20server%20round-trips.%22&amp;f=false" rel="noreferrer">Ultra-Fast ASP.NET: Chapter 3 - Caching</a>:</p>
  
  <blockquote>
    <p>Files that the browser retrieves from the server should be stored in
    the browser’s cache as long as possible to help minimize server
    round-trips.</p>
  </blockquote>
  
  <ul>
  <li><p>But how does IIS know what a <em>static content</em> actually is and is not? </p>
  
  <p>Is it just images, CSS, JS <em>and not</em> ASPX, ashx...?</p>
  
  <p><em>Where</em> can I see in IIS what is already considered to be <em>static</em> and what <em>is not</em> ? </p></li>
  <li><p>What about the scenario where a page has been declared with <code>&lt;%@ OutputCache</code> header (without <code>location</code>)? Are the <code>images</code>, <code>CSS</code> and <code>JS</code> source files inside of it <em>also</em> being output cached with the same properties?</p></li>
  <li><p>As a best practice, I should set one year into the future as the maximum expiration time. I should use that as the default for all static content on the site</p></li>
  </ul>
  
  <p>So I did this : </p>
  
  <p><img src="https://i.stack.imgur.com/aMwWX.jpg" alt="Set Common HTTP Response Headers"></p>
  
  <p>But later, after pressing <code>OK</code>, I <em>can't find any</em> summary menu which shows me: <em>to whom</em> I already put a response header (in this case: the <code>css</code> folder).  </p>
  
  <p><em>Currently</em>, in order to see that <code>css</code> folder has been applied with response headers - I have to go to the <code>css</code> folder <strong>again</strong> <code>--&gt;</code> Http Response Header<code>--&gt;</code>Set Common Headers <code>--&gt;</code> and then I see it. It isn't written in the web.config.</p>
  
  <p><em>But</em> if I do it for a file (<code>Login.aspx</code> for example):  I do see it in web.config:</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;location path="Login.aspx"&gt;
          &lt;system.webServer&gt;
              &lt;staticContent&gt;
                  &lt;clientCache cacheControlMode="UseExpires" cacheControlMaxAge="1.00:00:00" httpExpires="Fri, 15 Feb 2013 00:00:00 GMT" /&gt;
              &lt;/staticContent&gt;
          &lt;/system.webServer&gt;
      &lt;/location&gt;
  &lt;/configuration&gt;
  </code></pre>