Quantcast
Channel: User Lalit Kale - Stack Overflow
Viewing all articles
Browse latest Browse all 30

Answer by Lalit Kale for angularjs code changes do not show up after browser refresh

$
0
0

Problem

  • Client-side (Browser) caching of static files in dev enviornment
  • Server-side (IIS Express) caching of static files in dev enviornment

Solutions

For Client-side (Browser) caching of static files in dev enviornment

  • Web.Config/ApplicationHost.config Approch: Web.config Approachsuggested by @NateBarbettini above. Please note that this approach isalso can be applied to 'Applicationhost.config' instead of web.configfile.
  • "Always Refresh From Server" in IE as suggested above by @Phil Degenhardt. Please find screenshot below.enter image description here
  • Navigate to source file location in browser address bar: Try to navigate to the JavaScript file in question by typing the address. It will show you JavaScript file contents. Once you do this, file gets updated.So you can again go back and try to navigate to proper landing page of your application. This time, you will see you get latest JavaScript code getting executed.e.g. If you have problem with not updating 'app/home/home-account.js'. Then in browser navigate to 'http://[your-host/localhost]:[specified port of your application]/app/home/home-account.js. This will show you the contents. Then again navigate to your application's home page i.e. in this case 'http://[your-host/localhost]:[specified port of your application]/'

For Server-side (IIS-Express) caching of static files in dev enviornment

  • visit IIS Express appcmd commandline utility. In my case, appcmd is located in "C:\Program Files(x86)\IIS Express\appcmd.exe" this path. Then use SITE list and SITE delete command to remove temporary files cached in iisexpress.

  • There is also one solution which is specific to IE mentioned here: Visual Studio 2013 caching older version of .js file


Viewing all articles
Browse latest Browse all 30

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>