I have an angular2
web app. Every time I make changes to it, I deploy it on a dev server using cPanel.
I build the app using ng build --env=prod
and then copy the contents of the dist
folder.
However, when I access the site, it always loads the old version. I have to clear my cache, only then does it load the latest version.
How can I fix this, so that, the latest version is loaded (but, if there is no change, then the cached copy can be loaded)?