简体   繁体   中英

HTML5 cache manifest exception

I tried to use the applicationcach on my site, but I have a big problem with it. I want to cache only 3 files: style.css favicon.ico and script.js .

The problem is, that the browser stores the other files also (eg. index.php)

The code is:

CACHE MANIFEST

FALLBACK:
/ /offline.php

NETWORK:
*

CACHE:
style.css
favicon.ico
script.js

The browser will always cache the file that the manifest is referenced from. If you're referencing your manifest from your index.php file then that file will be cached. You may be able to include a static file in an iframe with a reference to the manifest so you don't have to include it in all your pages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM