【问题标题】:Mvc Bundling, Cache with Content or Cache with file name?Mvc 捆绑,带有内容的缓存还是带有文件名的缓存?
【发布时间】:2013-01-06 16:27:47
【问题描述】:

我决定从我的 Mvc Web 应用程序中引用的静态内容中删除所有版本。但我需要缓存。

我想知道浏览器是按文件名还是按内容缓存内容? 例如,如果我捆绑了一个没有版本信息的 Jquery 1.6 版(即 jquery.js),然后我将 1.8 版的 jquery 与以前的文件名(jquery.js)放在一起。会发生什么 ?浏览器是否获取新文件?

谢谢

【问题讨论】:

    标签: model-view-controller caching bundling-and-minification asp.net-optimization


    【解决方案1】:

    Bundling 通过文件的实际内容在 bundle url(?v=12345) 中生成缓存代码,因此每次更改 bundle 的实际内容时浏览器都会缓存不同的 bundle url .

    【讨论】:

      猜你喜欢
      • 2011-07-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-21
      • 1970-01-01
      • 2012-06-02
      • 1970-01-01
      相关资源
      最近更新 更多