Breadcrumb

Cache manifest in drupal

This blog gives you an understanding about cache manifest in Drupal. Cache manifest is used to cache pages in local server to use it when there is no network connection. This can be easily done by adding attribute "manifest="filename.appcache" to the HTML tag as mentioned below:

<htmlmanifest="example.appcache">
..
....
</html>

More details about cache manifest in general can be found here. Creating a manifest file and referring that file in HTML tag is simple and straightforward in normal HTML file. Now the question is, can this be done in Drupal? Yes, of course this is possible.

Another question may arise, cache manifest is in HTML5, will it also work in Drupal site which is not in HTML5.? Again yes to your question, it will work. Just adding manifest attribute to html tag is enough. Let us see this in detail below about how cache manifest can be implemented in Drupal.

There are two ways to do this in Drupal, first by adding manifest value in html_attributes in hook_preprocess_html as mentioned below:

The goal for customers is to not only have a visually attractive product but also make sure it has superb functionality. We accomplish this by building feature-rich, engaging, and user-friendly mobile app and web solutions consisting of intuitive UX, present-day technologies and tools and best-in-class interfaces.