HTML5 Cache Manifest problem
I am trying to use it to cache all the static files for my application (images, JS etc.) but I am running into a problem. My cache manifest file can looks like this:
CACHE MANIFEST
CACHE:
templates/v2/css/somecss.css
templates/v2/js/somejs.js
templates/v2/images/someimages.jpg
NETWORK:
*
This does cache those files that I have added to it (a few hundred so I omitted most of them out) but it also caches pages that I don't want (ex. index.php). It dramatically lowers the loadtime of the whole application but I need it not to cache any php files. I am using MultiViews if that makes any difference.
I have also tried adding a list of the files that I don't want cached under network but it still caches them. The full file can be found at https://app.emailsmsmar开发者_JS百科keting.com/cache.manifest
The problem might not be with the manifest itself.
Are you adding the manifest
attribute to all your php pages? That could be the issue.
The manifest attribute should be included on every page of your web application that you want cached. The browser does not cache a page if it does not contain the manifest attribute (unless it is explicitly listed in the manifest file itself. This means that any page the user navigates to that include a manifest will be implicitly added to the application cache.
http://www.html5rocks.com/en/tutorials/appcache/beginner/#toc-manifest-file-reference
You can also specify the .php files which you do not want to be cached in the NETWORK section. WHichever file you specify here will be accessed from the server.
You can make use of wildcard i believe for all php files
精彩评论