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
I simply deleted the dist folder in Visual Studio and it auto refreshed again.
**** this was for Angular 7 ***
You need to change the aspnetcore enviroment variable from production to development. From the official website:
... set an environment variable to tell ASP.NET to run in development mode:
If you are in linux, you might have to do it as a superuser. i.e.
sudo export ASPNETCORE_ENVIRONMENT=Development
The value of the variable may revert back to Production
after re-booting. If you want to work with several environments, I suggest you define them in the launchSettings.json
file:
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:40088/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express (Staging)": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Staging"
}
}
}
}
Read about environments here:
I opened link in Incognito mode since in that mode cache is disabled and Voila it worked.
For me, none of the previous answers worked. I was using Chrome, and the only way I was able to view the update was by opening an incognito window. My regular browser window, for some reason, just will not get the latest assets.
I have tried clearing my cache, disabling cache on devtools, and hard refresh, to no avail. The only way I was able to fix it was by clearing the DNS cache. Here's a link with more details:
How to Clear the DNS Cache on Computers and Web Browsers
Using command line, here's how you go about doing it:
Windows 7 & Earlier
ipconfig /flushdns
Windows 8
ipconfig /flushdns
OSX (Yosemite, El Capitain, and Sierra)
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
You need to run command yarn webpack:build
to recompile your client code. Otherwise modifications/updates in .HTML
, .json
, .ts
files will not be reflected.