django-html5-appcache leverages django
frameworks to browse project urls and assets and generate an appcache manifest
Manifest file generation¶
The manifest file is generated collecting all the cached urls and exploring them using the test client to extract asset urls and including them in the manifest itself.
As this can be quite resource intensive, the manifest file is saved in the project cache; the view that actually delivers the file manifest to the browser can thus use the project cache to serve it with no performance impact.
Whenever a registered model is saved or deleted (see Enabling caching in your application on how to enable this for your application), manifest cache is marked as dirty; this has no immediate effect on the manifest file served, as the oudated copy is still served.
To actually refresh the manifest file served to users, it’s necessary to regenerate it (see above).
django-html5-appcache uses the sitemap as a primary mean to discover urls in
the web application.
This is a two steps process:
- get the sitemap and extract the urls declared
- scrape each url and extract the asset urls
In the scraping phase, the actual HTML of each page is generated and analyed.
django-html5-appcache extracts data from
link tags. See
for more in depth details.
See In the Markup on how to customize the assets extraction in your markup.