Since no one seems to be sharing their thoughts, I'll go ahead and discuss the solution I've implemented. It's effective, but there is room for improvement.
IIS Configuration:
In your IIS settings, navigate to http features > http response headers > set custom headers > Expire Web Content: Immediately
(If you don't see http features, you will need to add this feature to your IIS server)
index.html Modifications:
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
<meta http-equiv="CACHE-CONTROL" content="NO-STORE">
(These settings may cause compatibility issues with older versions of Internet Explorer)
The current approach works, but I believe finding a better caching balance between releases would be beneficial.
An alternative method could involve using a build tool like Grunt to generate unique filenames for scripts in production and updating links in index.html accordingly. This way, full caching can be enabled, ensuring that browsers always request the latest version of files due to unique filenames. (Some users append ?v=666 to files, but this isn't considered a reliable method)
If you are serving content from .Net pages instead of basic .html, consider using Bundler to manage tags across releases.
bundles.Add(new ScriptBundle("~/bundles/angular").Include("~/Scripts/angular/angular.js")
.Include("~/Scripts/angular/angular-route.js"));
This setup will produce something like
<script src="/bundles/angular?v=20LMOimhsS0zmHdsbxeBlJ05XNyVXwPaS4nt3KuzemE1"></script>
Update:
In addition, I have also started including a version parameter in template includes to prevent caching completely, although this should be tested thoroughly before implementation.
<div data-ng-include=" 'app/import/import-summary.html?v=' + appVersion "></div>
The variable "appVersion" can be a global variable defined in app.js
app.run(['$route', '$rootScope', function ($route, $rootScope) {
$rootScope.appVersion = getBuildVersion(); // This value can be retrieved from assembly file versions or any other source where versions are generated by your build server
}]);