title: Cache busting on Angular
body: <p>I have an angular application and very often after deployment I get complaints from end users that they are unable to see the new features (they still have to <kbd>ctrl</kbd> + <kbd>f5</kbd> before the changes reflect).</p>
  <p>Do I need to incorporate cache busting? After a bit of Googling, I saw the following command:</p>
  <pre class="lang-sh prettyprint-override"><code>ng build --output-hashing=all
  </code></pre>
  <p>I tried using it in my deployment pipeline and it was able to solve some of the issues but not all. there are some changes that I still need to do <kbd>ctrl</kbd> + <kbd>f5</kbd> for.</p>
  <p>How do I make sure my application is updated for my end users without requiring them to clear their own cache?</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;name&quot;: &quot;portfolio&quot;,
      &quot;version&quot;: &quot;0.0.0&quot;,
      &quot;scripts&quot;: {
      &quot;ng&quot;: &quot;ng&quot;,
      &quot;start&quot;: &quot;ng serve&quot;,
      &quot;build&quot;: &quot;ng build&quot;,
      &quot;test&quot;: &quot;ng test&quot;,
      &quot;lint&quot;: &quot;ng lint&quot;,
      &quot;e2e&quot;: &quot;ng e2e&quot;,
      &quot;prod-build-dev-old&quot;: &quot;ng build --prod --configuration=dev --build-optimizer&quot;,
      &quot;prod-build-dev&quot;: &quot;ng build --prod --configuration=dev --build-optimizer --aot --output-hashing=all&quot;,
      &quot;prod-build-staging&quot;: &quot;ng build --prod --configuration=staging --build-optimizer&quot;
  },
  </code></pre>