Offline Caching Using the HTML5 manifest Attribute

Use the manifest attribute of the <apex:page> tag to set an HTML5 cache manifest for offline caching of a page’s critical resources.
The value of the manifest attribute is passed through to the generated HTML. For example:
<apex:page showHeader="false" sidebar="false" standardStylesheets="false"
    docType="html-5.0" manifest="/apex/CacheManifest">

        <header>
            <h1>Congratulations!</h1>
        </header>
        <article>
            <p>This page looks almost like HTML5!</p>
        </article>

</apex:page>
Renders the following <html> tag:
<html manifest="/apex/CacheManifest">

The manifest attribute is available on the <apex:page> tag for Visualforce pages set to API version 28.0 or higher, and also requires that the applyHtmlTag is set to true (the default).

You can use Visualforce to provide a page’s cache manifest. For example, the CacheManifest page referenced above might be:
<apex:page contentType="text/cache-manifest" applyHtmlTag="false" 
     standardStylesheets="false" showHeader="false">
CACHE MANIFEST
index.html
stylesheet.css
images/logo.png
scripts/main.js
</apex:page>
Previous
Next