Visual Studio 没有将新文件部署到 IIS Express
Visual Studio isn't deploying new files to IIS Express
我在 Visual Studio 2013 年创建了一个新项目。这是一个 HTML Application with TypeScript
项目。当我部署它(Ctrl-F5 或 F5)时,我没有看到我对 html/css/ts 文件所做的更改。我如何让 VS 将站点重新部署到 IIS Express?
我应该补充一点,这是非常不确定的。
我应该补充一点,这似乎只是 IE 的问题,而不是 Chrome。
当您注意到浏览器之间的不同行为时,您应该怀疑网络浏览器。
您可以使用 Ctrl+F5 在 Internet Explorer 中强制重新加载页面。
您可能还想通过使用 web.config 文件中的 clientCache 条目来设置 HTTP 过期 header:
"The element of the element specifies cache-related HTTP headers that IIS 7 and later sends to Web clients, which control how Web clients and proxy servers will cache the content that IIS 7 and later returns.
For example, the httpExpires attribute specifies a date and time that the content should expire, and IIS 7 and later will add an HTTP "Expires" header to the response. The value for the httpExpires attribute must be a fully-formatted date and time that follows the specification in RFC 1123. For example: Fri, 01 Jan 2010 12:00:00 GMT"
...但请记住在“真实”部署时针对实际网站适当设置它。或者您可能决定使用 cacheControlMaxAge
更合适。
我在 Visual Studio 2013 年创建了一个新项目。这是一个 HTML Application with TypeScript
项目。当我部署它(Ctrl-F5 或 F5)时,我没有看到我对 html/css/ts 文件所做的更改。我如何让 VS 将站点重新部署到 IIS Express?
我应该补充一点,这是非常不确定的。
我应该补充一点,这似乎只是 IE 的问题,而不是 Chrome。
当您注意到浏览器之间的不同行为时,您应该怀疑网络浏览器。
您可以使用 Ctrl+F5 在 Internet Explorer 中强制重新加载页面。
您可能还想通过使用 web.config 文件中的 clientCache 条目来设置 HTTP 过期 header:
"The element of the element specifies cache-related HTTP headers that IIS 7 and later sends to Web clients, which control how Web clients and proxy servers will cache the content that IIS 7 and later returns.
For example, the httpExpires attribute specifies a date and time that the content should expire, and IIS 7 and later will add an HTTP "Expires" header to the response. The value for the httpExpires attribute must be a fully-formatted date and time that follows the specification in RFC 1123. For example: Fri, 01 Jan 2010 12:00:00 GMT"
...但请记住在“真实”部署时针对实际网站适当设置它。或者您可能决定使用 cacheControlMaxAge
更合适。