0

I am developing an HTML5-Application and I want to store some binary files locally to view them in offline mode. I found a way to do it on mobile devices with phonegap. Now I want to store those files using some kind of plugin in Google Chrome or Safari. I found the Gears API but the storage of files is deprectated. Does anyone know a way to store binary files locally using Google Chrome or Safari?

Thanks in Advance

Franziskus Karsunke
  • 4,948
  • 3
  • 40
  • 54

2 Answers2

1

Gears API has been deprecated in favor of AppCache found in HTML5.

Alexander Pavlov
  • 31,598
  • 5
  • 67
  • 93
  • The problem is, that I want to store pdf files dynamically depending on some situations. The AppCache is for static resources as far as i know. – Franziskus Karsunke Mar 05 '12 at 15:47
  • I believe you can use [IndexedDB](http://www.w3.org/TR/IndexedDB/) in that case (see [this SO question](http://stackoverflow.com/questions/5692820/max-size-in-indexeddb) for details on size limits.) – Alexander Pavlov Mar 05 '12 at 16:11
  • Thank you for that. Do you know another way which doesn't have these limitations (maybe a plugin) ?!? – Franziskus Karsunke Mar 05 '12 at 19:44
  • I would not treat asking a user if they agree to increase the limits as a "limitation" :) Anyway, safety is important, and you would not want any plugin out there to be able to fill up your hard drive with a huge something, would you? You could also look into Local Storage for Flash, but it looks like they also have certain limits (see [here](http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager07.html)). – Alexander Pavlov Mar 05 '12 at 21:32
0

I think HTML5 filesystem api ist the best solution for your case. No size limitations so far as i know. http://www.html5rocks.com/en/tutorials/file/filesystem/

Marius
  • 101
  • 7
  • According to http://www.chromestatus.com/features Safari and Firefox are opposed to implementing this API but there's no explanation why. – w00t Apr 04 '13 at 09:48