缓存清单缓存网络文件

时间:2013-12-09 17:30:22

标签: php html5 caching browser-cache cache-manifest

我的缓存清单文件存在问题。这就是它的样子(从列表中删除了一些文件以缩短它们):

CACHE MANIFEST
#r8

CACHE:
fonts/glyphicons-halflings-regular.svg
fonts/glyphicons-halflings-regular.eot
fonts/glyphicons-halflings-regular.ttf
fonts/glyphicons-halflings-regular.woff
css/bootstrap.min.css
css/receipt.min.css
css/smoothness/jquery-ui-1.10.3.custom.css

NETWORK:
index.php
*
http://*

我在使用index.php缓存方面遇到了一些问题,因此我清除了缓存并在Google Chrome中打开了控制台,然后重新加载了该页面。

Application Cache Progress event (12 of 13) http://www.magnusburton.com/stackd/index.php:1
Application Cache Progress event (13 of 13)
Application Cache UpdateReady event

从我所看到的情况来看,Chrome似乎仍在缓存index.php,即使它位于 NETWORK 部分下。

如何阻止任何浏览器缓存此文件?

1 个答案:

答案 0 :(得分:0)

你不能 - 引用appcache清单的页面将始终被缓存,即使你指定它不被缓存。

请参阅6.7.3.3的绿色部分,正好在32.下方:http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#parsing-cache-manifests