Any time, I make code changes in .hmtl file or the .js file, the browser still renders the old code and my new code changes don\'t show up in the browser result.
Fo
deleting the dist folder from clientApp folder from source resolve my issue and it started auto refresh again
For Client-side (Browser) caching of static files in dev enviornment
'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
This happens because of cache stored by the browser. Before running your application you can delete cache and cookies stored by your browser.
Besides using Dev Tools to make sure the cache is disabled, you can edit your Web.config
file and tell IIS to not cache your Angular files:
<configuration>
<!-- Disable IIS caching for directories containing Angular templates and scripts -->
<location path="app">
<system.webServer>
<staticContent>
<clientCache cacheControlMode="DisableCache"/>
</staticContent>
</system.webServer>
</location>
...
</configuration>
My Angular root directory is app/
. You may need to modify according to your file structure.
Hit F12 in your browser to bring up the Developer Tools. Disable the Cache. Reload your page.
TypeScript only!
In tsconfig.json add…
"compileOnSave": true,