I've created an application using Angular and Angular CLI.
To publish, I run ng build --prod --aot
. It produces a dist
folder that I upload to the web server and enjoy seeing it in action.
Yet I've configured my web server to cache things.
When a user gets the current version of my SPA, index.html
and all .js
files and all .css
files are all cached.
Now that I'm deploying new version, though all of the new .js
and .css
files are versioned, but the old index.html
is till there and it's cached.
I've used Cache-Control: no-cache
header, but seems that browsers are not consistent in this area.
Is it possible to configure Angular CLI to version index.html
too?