My single page app is set up using AngularJS and gulp. Whenever I run the command gulp build
, it compiles my assets into minified JavaScript and CSS files like app98D9898.css
. The random number in the file name changes with each build.
The HTML page named index.html
is responsible for loading these CSS and JavaScript files.
So far, everything has been functioning as intended.
To serve my static files, I use NGINX as a proxy. However, a major problem has surfaced: Chrome and Firefox are caching the index.html
file. As a result, even when I build a new version of my app, the browsers continue to load the outdated one.
I'm on the lookout for a solution that involves configuring NGINX to avoid caching the index.html
file. Any suggestions on how I can tackle this issue?