visual studio not updating html / javascript to server / browser

余生颓废 提交于 2019-11-27 20:33:46

In Opera and Chrome (and possibly others), you can disable caching while in 'development mode'.

While in DevTools, the 2nd option in the Settings menu is

Disable cache (while DevTools is open)

Go to your web.config file and make a change in it.Its not matter what change you make.For example type a character and then delete it and build the project and run it again.I hope it works.

I also experienced this issue and turns out it was related to caching.

If using Chrome DevTools, you can simply disable cache by navigating to the Network Tab and ticking Disable Cache

This will only disable the cache when Dev Tools is open.

ctrl+shift+F5 will do the trick! Seems like browser cache is part of the problem :)

in my case iis express not updated site, but site , created by iis Manager worked correctly?

possible solution for this problem is set "use this 64 bit version of iis express for web sites and projects" option at visual studio it located at options->Projects and Solutions->Web projects

The browsers cache by default. You can turn off caching in your browser to get the changed files.

I found that I had the .js file open in the Chrome Developer Tools -> Sources View.

When I closed the file there and refreshed the page the new .js file showed up as expected.

If you just want to test locally You can try

A) Create Virtual Directory Follow below path: Project / Properties / Web
Find Servers section Click on Create Virtual directory

B) Follow below path: Project / Properties / Web
Find Servers section Click on Drop down and change the selected value between Express and Local Then Create Virtual directory

I had an issue with moved .ts & .html files on the server and had to:

  1. stop debugging
  2. clear the whole output/dist folder inside my ClientApp
  3. start debugging again
  4. Ctrl-F5 to force the cache to refresh on the browser

Simply disabling the browser's cache, or forcing the .net app to recompile, or even running ng serve had no effect.

In case disabling the cache and editing the web.config file does not work.

Simply close the solution and reopen it and try it. Strange, but it worked for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!