title: How to invalidate browser cache using just configuration in the webserver?
body: <p>For a long time I've been updating <code>ASP.NET</code> pages on the server and never find the <strong>correct</strong> way to make changes visible on files like <code>CSS</code> and <code>images</code>.</p>
  
  <p>I know if a append something in the <code>URL</code> the browser will think the file is another one:</p>
  
  <pre><code>&lt;img src="/images/myLogo.png?v=1"/&gt;
  </code></pre>
  
  <p>or perhaps changing its name:</p>
  
  <pre><code>&lt;img src="/images/myLogo.v1.png"/&gt;
  </code></pre>
  
  <p>Unfortunately it does not look the correct way. In a case were I'm using <code>App_Themes</code> the files in this folder are automatically injected in the page in a way I can't easily change the <code>URL</code>.</p>
  
  <p>So my question is:</p>
  
  <p>When I'm publishing de <code>ASP.NET Application</code> on the server what is the correct way to signal to <code>IIS</code> (and it notify browser after that) that a file was changed? It is not automatic? Should I change some configuration in <code>IIS</code> or perhaps make some "<em>decoration</em>" in the code?</p>
  
  <p>I've already tried many questions here in SO like <em><a href="https://stackoverflow.com/questions/1804390/asp-net-invalidate-browser-cache">"ASP.NET - Invalidate browser cache"</a>, <a href="https://stackoverflow.com/questions/20031917/how-to-refresh-the-browser-cache-of-an-image">"How to refresh the browser cache of an image?"</a>, <a href="https://stackoverflow.com/questions/9266769/handle-cached-images-how-to-get-the-browser-to-show-the-new-version">"Handle cached images? How to get the browser to show the new version?"</a></em>, and even <em><a href="https://stackoverflow.com/questions/118884/what-is-an-elegant-way-to-force-browsers-to-reload-cached-css-js-files">"What is an elegant way to force browsers to reload cached CSS/JS files?"</a></em>  but none of them actually take another aproach else in a way you must handle it manually in the code instead of <code>IIS</code> or <code>ASP.NET</code> configuration.</p>
  
  <p>The closer I could find is <em><a href="https://stackoverflow.com/questions/3017315/asking-browsers-to-cache-our-images-asp-net-iis">"Asking browsers to cache our images (ASP.NET/IIS)"</a></em> where they set expiration but not based on the fact the files were update. Instead they used days or hour to cache those file so they would updated even when no changes were made.</p>
  
  <p>I'm want to know if <code>IIS</code> or <code>ASP.NET</code> offers something related to this, automatically send to the browser that the files was changed. Is it possible/built in?</p>