HTML5 应用缓存 : How to exclude the htm-file from cache where the manifest is defined

标签 html caching manifest application-cache

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

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

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

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

有谁知道虽然 list 在 index.htm-file 中定义,但 index.htm-file 不被缓存是如何做到的?

最佳答案

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

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

喂!

关于HTML5 应用缓存 : How to exclude the htm-file from cache where the manifest is defined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33218475/

相关文章:

javascript - HTML Canvas ,使用灰度图像作为蒙版

PHP-HTML5-Form - 我的查询生成的下拉列表发布了一个空白值

ASP.NET 异步缓存

java - JVM 和操作系统 DNS 缓存

ruby-on-rails - 片段缓存和用户头像/图像

javascript - GWT 包括模块 list 中的外部 javascript 文件

javascript - html 页面中的 Javascript 不起作用,但它可以在 drupal 页面上运行

android - 由于 list 设置,蜂窝不支持

java - 如何从可执行 jar 引用 Maven 依赖项 jar?

html - 带填充的 CSS 网格溢出容器