title: Is angular-cli's --output-hashing always supposed to work with lazily loaded modules?
body: <p>I thought I have been successfully cache busting with angular-cli's <code>--output-hashing</code> option set to <code>all</code> to ensure users get the latest chunks/updates. I realized this isn't always working for lazily-loaded modules.</p>
  
  <p>If I make changes <em>only</em> to a lazily-loaded module + build + deploy to IIS, AND go to a URL that belongs to the lazily-loaded module, then I get the latest changes as expected.</p>
  
  <p>However, if I close and re-open the browser and go to a URL that does not belong to the lazily-loaded module, and then click to a link that takes me to the lazily-loaded module, the latest changes are not observed.</p>
  
  <p>It's almost as if browser is assuming nothing is changed whenever I enter the app from a module that hasn't changed, and doesn't pick up the new chunk later when I visit the module that <em>is</em> changed.</p>
  
  <p>Even stranger, when I tried to replicate the issue to provide some screenshots, the issue went away.</p>
  
  <p>Has anyone else experienced inconsistency with cache busting using output-hashing?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>After investigating some more, it turns out that if I go to the landing page of my site [IP address]:[port], then the index.html comes from the cache.</p>
  
  <p>Instead, if I go to any other route [IP address]:[port]/[route], then the index.html comes from the server.</p>
  
  <p>Since index.html points to inline.(hash).bundle.js, which in return points to lazily-loaded modules, getting the old copy of index.html results in getting old versions of inline.js and other modules.</p>
  
  <p>I tried to add <code>&lt;meta http-equiv="expires" content="0" /&gt;</code> to index.html and cleared browser cache, and still got the file from cache.</p>
  
  <p>I also tried adding a section into web.config, but this did not work either.</p>
  
  <p>How to ensure index.html always comes from the server?</p>
  
  <p><a href="https://i.stack.imgur.com/877gC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/877gC.png" alt="enter image description here"></a></p>