2

I'm creating an app with a number of videos/large images that will use appcache to handle the preloading of them.

Is there a way for me to control what order those assets get loaded? For example, I would like to load the big image/video on the homepage before the ones on the sub pages. I have tried listing the files in the order I want them to load in the appcache manifest but that didn't seem to make a difference.

boz
  • 4,891
  • 5
  • 41
  • 68
  • 2
    No, I don't think there is anything in the specification that mentions download order. You might have to shard your application to get the behaviour you want. One manifest for the homepage, other(s) for the sub-sites. – Paul Grime Jan 23 '12 at 12:42

1 Answers1

4

It doesn't matter what order they're downloaded in. Appcache operations are atomic. Nothing is available from the appcache for a particular manifest file until everything is available from the appcache for that manifest.

If you want to break up the download then, as @PaulGrime suggests, have multiple manifest files. You will need to have the user visit the host page for each manifest but you should be able to manage that with a hidden iframe or something.

robertc
  • 74,533
  • 18
  • 193
  • 177
  • Thanks for that - I spent a while trying to find this sort of information on google without much success. – boz Jan 23 '12 at 14:31
  • maybe you could help me? so I only need the manifest refrences in one place and not every page? http://stackoverflow.com/questions/9287044/my-html5-application-cache-manifest-is-caching-everything – Neo Feb 15 '12 at 03:29
  • @robertc I wasn't sure you were gonna get a notification if I didn't tag your name. – Neo Feb 15 '12 at 05:24