Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

99
Views
Cache busting on Angular

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 ctrl + f5 before the changes reflect).

Do I need to incorporate cache busting? After a bit of Googling, I saw the following command:

ng build --output-hashing=all

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 ctrl + f5 for.

How do I make sure my application is updated for my end users without requiring them to clear their own cache?

{
    "name": "portfolio",
    "version": "0.0.0",
    "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "prod-build-dev-old": "ng build --prod --configuration=dev --build-optimizer",
    "prod-build-dev": "ng build --prod --configuration=dev --build-optimizer --aot --output-hashing=all",
    "prod-build-staging": "ng build --prod --configuration=staging --build-optimizer"
},
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I think that's a browser's cache issue.

What I suggest is to add these three lines in your index.html:

<!doctype html>
<html>
  <head>
    ...

    <!--  Add the 3 following lines -->

    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="expires" content="-1">

    ...
  </head>
  <body>
    ...
  </body>
</html>

Once these updates got deployed, your clients wont have to ctrl + f5 after every deployment to get the new features.

For more informations about browser cache control, please check : Cache-Control in MDN.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!