cakephp/docs — pull request #223 by sime (2012-03-18 03:35:42+00:00)
Title: Make docs available offline using Application Cache

I believe it would be very useful to make the Cookbook 2.x documentation available offline within the browser.

This patch will generate a manifest.appcache file in the root of the built English documentation: build/html/en/manifest.appcache. On each build a new timestamp is inserted to bust the cache.

The HTML element could not be overridden. So I retrieved the default layout.html from the Sphinx project and added it to theme directory as html.html. I extended the HTML element to contain the appropriate manifest attribute, unique to each language.

Up for discussion is if all HTML documents should be the explicitly listed in the manifest. Forcing the user to download the whole English Cookbook. Firefox and Chrome report the size of the cache being 3.1 and 5.7 MB respectively. Otherwise pages with the manifest attribute will be implicitly cached.

On the server side, the [manifest file] must be served with the MIME type text/cache-manifest

[manifest file]: http://dev.w3.org/html5/spec/offline.html#writing-cache-manifests