6

We have a web application that is supposed to work offline on iPads. It's using manifest to define which files need to be cached. The point is that we have reached the 10MB limit the iPad has to store those files, and we need to add even more files to the list.

Is there any workaround to increase this limit, or store the files in any other way? Note that going native is not an option at this moment.

Manuel Pedrera
  • 5,347
  • 2
  • 30
  • 47

2 Answers2

0

You could take a look at this.

Try repeating the process of increasing the manifest in chunks less than 5MB before updating the cache with window.applicationCache.update() and you should be able to pass the 10mb limit

Community
  • 1
  • 1
Zeeno
  • 2,671
  • 9
  • 37
  • 60
  • Could you please elaborate on this? I mean, what does *increase the manifest* mean applied to this context? As far as I know, manifest is specified into an attribute of `html` tag (in this case, it's pointing to a PHP script which gets the files dynamically). How can I change its contents at runtime? – Manuel Pedrera Sep 12 '11 at 13:50
0

as i understand you can do trick like this:

cache.manifest is a file generated with PHP, on first generation it returns file list less then 5Mb and sets a cookie flag. client side script on 'cached' event checks if cookie set and calls window.applicationCache.update() so PHP code runs again it checks if cookie set and return full cache.manifest file, updates cookie flag

Dmitry
  • 812
  • 8
  • 13
  • Are you sure that PHP code runs again? Being server side I think that it's going to call the content previously rendered by the PHP script, unless `window.applicationCache.update()` makes an asynchronous request... – Manuel Pedrera Sep 15 '11 at 20:06
  • when you call `window.applicationCache.update()` browser makes a request to server to get new cache.manifest, while cache.manifest generated by PHP script it will run again and generate new file depending if cookie flag set or not – Dmitry Sep 15 '11 at 20:17
  • actually this is what i suggested to make assync request with `window.applicationCache.update()` and use cookies to detect which version of manifest should be returned – Dmitry Sep 15 '11 at 20:20
  • Will have to try that. Since I don't have the necessary time right now and the bounty is expiring, I'll assign it to this answer and will mark it as the correct one if it works when I try :) – Manuel Pedrera Sep 19 '11 at 07:49