开发者

How to execule file from the cached file in html5 offline?

I wrote a cache.manifest for my html5 page (index.php)

The content in cache manifest:

CACHE MANIFEST

#version 1.0 09-16-2011
CACHE:
/images/app.jpg
/css/app.css
/js/app/js

NETWORK:
*

The static files are cached ok, but the host file index.php is cached too. If i remove the cache.manifest from index.php, it'll never be cached.

How can i excu开发者_StackOverflow社区lde index.php from the cached files?


It's not possible to exclude the linking page (at least for now... HTML5 is still a draft) from the cacheing process.

PS: it's also incorrect to speak about .manifest, while W3C introduced a new definition .appcache (http://www.w3.org/TR/html5/offline.html)


The only way to exclude it is not to link to the manifest from it. Pages which reference a manifest file are always cached.


If you don’t want to cache index.php add it to the NETWORK section of your manifest: resources in there are never cached and aren’t available off-line.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜