Been trying to make Appcache works with CI for several hours but still couldn't get it work.
Background:
I'm using IIS server. I've tested the Appcache by putting the manifest file and the php file that needs to be cached in a simple folder, it worked, so I'm pretty sure the server environment is good.
Say I want to cache the url below
http://mydomain.com.au/myapp/index.php/test/index
Here's my manifest.php (I don't know which one will work so I put 2 lines under CACHE, they all refer to the same view file)
<?php
header('Content-Type: text/cache-manifest');
echo "CACHE MANIFEST
CACHE:
index.php
http://mydomain.com.au/myapp/index.php/test/index
";
?>
Below is my view file(index.php) placed in the view folder of course
<!DOCTYPE HTML>
<html manifest="manifest.php">
<body>
this is a test
</body>
</html>
Question is, where should I put this manifest file? And what file I should list under CACHE? Is there any routine that I need to follow if I want to use appcache with CI?
I've tried putting it in the same view folder, in a public folder(outside of application folder) with no luck.
Thank you in advance.
You can make a
Manifest
controller with just anindex()
method, and make/index.php/manifest
return theCACHE MANIFEST
document (with appropriate headers).And then include that on the page with
Additional notes: