Is it possible to add an entire folder of files to an HTML5 cache manifest file? I can't list all of the files in the folder individually because the files in this folder will be dynamically changing (it is a folder of images).
If the folder is dynamically changing, then it should not be in the application manifest. If the folder changes, then there still needs to be some sort of link from the page to the files in the folder. The manifest should just list off those items.
For instance:
/images/
1.jpg
2.jpg
3.jpg
4.jpg
and the (simplified) HTML file:
<html manifest="http://foo.bar/cache-manifest">
<body>
<img src="images/2.jpg" />
<img src="images/4.jpg" />
Should have a manifest that looks like this:
CACHE MANIFEST
http://foo.bar/images/2.jpg
http://foo.bar/images/4.jpg
If you wanted to update the manifest file to include new items, you can simply add a URL parameter that changes when the contents of the folder (and the manifest) change:
<html manifest="http://foo.bar/cache-manifest?updated=8_23_2010_1_53_pm">
Whenever the manifest URL changes, it will be re-downloaded.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With