I am building an Office Web App in AngularJs, and my views are being cached, I'm am trying to work out how to prevent caching of my AngularJS views.
Changes the Index.html file and as *.js are reflected in the tab pane, but any changes in the view are not. Here are some things that have not worked:
Adding these to the header of index.html:
<meta http-equiv="cache-control" content="no-store">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
Adding this to application.js:
app.run(function ($rootScope, $templateCache) {
$templateCache.removeAll();
$rootScope.$on('$viewContentLoaded', function () {
$templateCache.removeAll();
});
});
Adding this to web.config:
<system.webServer>
<staticContent>
<clientCache cacheControlMode="DisableCache" />
</staticContent>
</system.webServer>
The only thing that has worked has been to rename the view.
The caching does not occur in Chrome, Firefox, or even IE when used independently.