title: Leverage browser caching : not able to set <location> attribute in web.config file
body: <p>For browser caching, I want to set expiration time for only one of my .js file in web.config not the whole js folder. For that I tried using the below configuration with the help of <a href="https://stackoverflow.com/questions/2195266/how-to-configure-static-content-cache-per-folder-and-extension-in-iis7">How to configure static content cache per folder and extension in IIS7?</a> but it doesn't work:</p>
  
  <pre><code>    &lt;configuration&gt;
       &lt;location path="compiled.js"&gt;
         &lt;system.webServer&gt;
          &lt;staticContent&gt;
           &lt;clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00" /&gt;
          &lt;/staticContent&gt;
         &lt;/system.webServer&gt;
       &lt;/location&gt;
    &lt;/configuration&gt;
  </code></pre>
  
  <p>Then I tried to change the path in "location" attribute as shown below but this also doesn't work for me:</p>
  
  <pre><code>&lt;configuration&gt;
     &lt;location path="~/js/compiled.js"&gt;
      &lt;system.webServer&gt;
        &lt;staticContent&gt;
          &lt;clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00" /&gt;
        &lt;/staticContent&gt;
      &lt;/system.webServer&gt;
      &lt;/location&gt;
    &lt;/configuration&gt;
  </code></pre>
  
  <p>Can someone help me how do I set cache expiration time for only one .js file instead of whole folder via web.config?</p>