视觉工作室不更新HTML / JavaScript的服务器/浏览器 [英] visual studio not updating html / javascript to server / browser

查看:128
本文介绍了视觉工作室不更新HTML / JavaScript的服务器/浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是用热毛巾SPA模板中的MVC应用程序4。每当我更改任何HTML和/或JavaScript,我可以得到新的code显示的唯一办法是清除浏览器缓存。 F5和cntrl-F5,移位-F5,没有什么工作。

This is an MVC 4 app using the Hot Towel SPA template. Whenever I change anything in the HTML and/or javascript the only way I can get the new code to display is to clear the browser cache. F5, cntrl-F5, shift-F5, nothing works.

我不是通常是一个Web开发和刚学这个。我以前做过定期的MVC和没有这个问题,也许它与在那里的HTML和JavaScript是在我的项目做(即在/ app文件夹)?我将疲于摸不着头脑。

I'm not normally a web dev and just learning this. I've done regular MVC before and not had this issue, maybe it has to do with where the HTML and javascript is in my project (i.e. in the /App folder) ?. I'm going nuts trying to figure this out.

我可以完全删除一个HTML文件并运行应用程序,它仍然运行,因为它没有。清除缓存并运行,然后我得到了更新。

I can completely delete an HTML file and run the app and it still runs as it did. Clear cache and run and I then get the update.

它使用IIS使用前preSS运行火狐,Chrome,IE浏览器...

It's running using IIS express using Firefox, Chrome, IE...

谢谢..

推荐答案

在Opera和Chrome(可能还有其他人),你可以同时发展模式禁用缓存。

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

而在DevTools,在设置菜单中的第二个选项是

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

禁用缓存(而DevTools是打开的)

Disable cache (while DevTools is open)

这篇关于视觉工作室不更新HTML / JavaScript的服务器/浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆