1

I am working on angular js application.

For the first time application is working fine, when we release a new build with new changes, when the user trying to access the page browser is still loading the old files new changes are showing in the browser, to load the new changes user has to clear the cache and reload the application.

Is there any way to clear the browser cache on the application load.

I am clearing the cache like below.

angular.module('myapp').run(function ($rootScope, $templateCache, $localStorage) { $rootScope.$on('$routeChangeStart', function (event, next, current) { $rootScope.$storage = $localStorage; if (typeof (current) !== 'undefined') { $templateCache.remove(current.templateUrl); } }); });

it is clearing the cache, but when any changes comes on the first load it is not clearing the browser cache.

Any help appreciated, thanks in advance.

Jackman
  • 157
  • 8
  • you can manually do it from go through the inspect element and then click on nwtwork part then right click on the network you will see clear browser cache. – user3722785 Nov 28 '14 at 07:50
  • are you using any kind of build job? do you concatenate all you javascript files? – tmaximini Nov 28 '14 at 08:33
  • Right now I am not using any build job, right now I am in testing phase, I manually move the html and js file to the environment, when the user access the application, browser looking for cache files not latest files in server, that is my issue. – Jackman Nov 28 '14 at 08:48

0 Answers0