0

I have an angular (11.1.2) application deployed on IIS. Whenever I do code changes and deploy on the server, the user has to manually refresh the website explicitly (by pressing F5 / clicking refresh button) to load new changes. If a user just closes the browser and reopens the application, it still loads previous version of the application.

I use the following command for the production build:

ng build --prod --aot --outputHashing=all

Is there anyway I can change it so it loads the latest copy of the application whenever user starts a new session.

developer
  • 1,401
  • 4
  • 28
  • 73
  • 1
    The output hashing just updates the scripts/styles and their respective entries in index.html. To prevent index.html from caching, see https://stackoverflow.com/questions/34851243/how-to-make-index-html-not-to-cache-when-the-site-contents-are-changes-in-angula/34851492 and various other answers on SO – luxdvie Nov 22 '21 at 15:46

0 Answers0