【问题标题】:HTML5 application cache: How to exclude the htm-file from cache where the manifest is definedHTML5 应用程序缓存:如何从定义清单的缓存中排除 htm 文件
【发布时间】:2016-01-18 00:57:10
【问题描述】:

我们在single-page-web-application 中使用HTML5 应用程序缓存。清单文件在index.htm-file 的-tag 中定义:

<html xxxxxxxxxxxxxxxxxxxxxxxxxxxxx manifest="/xxxxxx/xxxxx.appcache">

index.htm-file 是唯一从网络服务器加载的 htm-file,因为网络应用程序是使用 angularJS 构建的单页网络应用程序。以下所有回复均在JSON

现在我们希望index.htm-file 不会缓存在HTML5 应用程序缓存中。但是因为 manifest-file 是在 index.htm-file 中定义的,所以这个后面的文件也被隐式缓存了。

有谁知道index.htm-file 没有被缓存,尽管清单是在index.htm-file 中定义的?

【问题讨论】:

  • 如果您找到答案,请务必更新此内容。

标签: html caching manifest application-cache


【解决方案1】:

我们遇到了http://dukecon.org 的缓存问题。请在此处查看讨论:how to selectively disable cache for spring boot (manifest.appcache)

也许我们解决方案的第二部分也将解决您的问题:为index.html 文件设置无缓存标头?这是使用 ServletFilter: https://github.com/dukecon/dukecon_server/blob/master/impl/src/main/java/org/dukecon/server/impl/CacheManifestFilter.groovy

执行的

HTH!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-10-23
    • 2013-04-16
    • 1970-01-01
    • 2014-07-25
    • 1970-01-01
    • 1970-01-01
    • 2011-09-09
    • 2012-03-06
    相关资源
    最近更新 更多