Follow

Asset Downloading

Overview

Pugpig downloads all assets in the background and uses a the standard HTML5 manifest format to specify the assets used by each page. The manifests can be referenced from either:

General

  • If a required asset is missing from the manifest, it will not be downloaded in advance and will not show offline.
  • Referencing an asset in the manifest that does not exist will cause the entire download to fail, unless you write specific code to ignore it.

Content Delivery Networks

Pugpig can serve static assets from a Content Delivery Network. The manifest needs to contain the absolute URL to the asset on the CDN. However, the HTML should always refer to the local asset.

Example Manifest File

CACHE MANIFEST
giraffe/css/default.css
giraffe/css/MousseScript.otf
giraffe/assets/knocking_6.wav
giraffe/images/01.jpg
http://mycdn.com/giraffemovie.mp4

 

Referencing the Manifest from HTML

If you are using the HTML Manifest Document Type, you need MUST reference the manifests from the HTML as shown below.

If you are using the Atom Document Type, you only need to reference the manifests from the HTML if you are not referencing them from the Atom feed. Referencing from the Atom feed is the preferred approach.

You do not need to do this for any other document formats.

  // your html document

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk