【问题标题】:How can I get chrome to stop caching when working on an aspx file in visual studio在 Visual Studio 中处理 aspx 文件时,如何让 chrome 停止缓存
【发布时间】:2011-06-03 04:25:11
【问题描述】:

我目前正在 Visual Studio 2010 内的 aspx 文件中编辑一些 html/css。我使用 Chrome 作为我的浏览器。当我在 Visual Studio 中进行更改并保存/ctrl + F5 运行时,由于拉取旧缓存版本的 CSS,它经常无法加载新更新的 .css 文件。

我以前使用 Visual Studio 作为我的主要 HTML 编辑器,但是当我使用纯 html/css 文件时,我只是在 chrome 中保存并刷新文件,它会 100% 地刷新更新后的 css。我只是在使用 aspx 文件并通过 ctrl + f5 运行时才开始遇到这个问题。有人知道我该如何解决这个问题吗?

【问题讨论】:

    标签: asp.net css visual-studio-2010 google-chrome


    【解决方案1】:
    1. 转到项目属性Web 选项卡
    2. 启动操作部分中选择启动外部程序
    3. 粘贴或浏览到 Google Chrome 的路径(我的是 C:\Users\Chris\AppData\Local\Google\Chrome\Application\chrome.exe
    4. 命令行参数框中输入-incognito

    如果您希望浏览器打开特定页面,则需要将 Visual Studio 开发服务器设置为使用特定端口(即 4066),然后更改命令行参数以包含该地址,例如:-incognito localhost:4066/Default.aspx

    隐身模式应防止会话甚至选项卡之间的缓存。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-01-08
      • 2020-10-18
      • 2012-01-13
      • 1970-01-01
      • 2014-04-17
      • 2019-04-25
      • 1970-01-01
      相关资源
      最近更新 更多