27

I am in the planning phases for writing an application, still choosing the technology that I wish to use to write the app. The initial idea was to write a web-app but this has (had?) the downfall of being unable to be viewed offline. I then discovered cache manifest, and this potentially seemed like an answer.

However, since that first point it seems that there are size limits on Cache Manifest. I can't find a full list of the size limits for each browser, so I can't tell if it's completely debilitating (though I think it may be). The browsers that I wish the app to work on are Firefox, Chrome and the mobile Safari browsers (that is, it has to work on iPad).

My understanding is that in most cases there is a total cache limit of about 5MB (with it varying from browser to browser), but this would not be enough for my needs. I'm looking to store all of the users online data offline. This includes things like uploaded files (PDFs, pictures) as well as the content required to make the app physically work. In any example I've seen, cache-manifest has only been used to cache offline things like the html, the css, the javascript and the image resources of the website. Is it suitable for offline storage of PDFs the user has uploaded?

If the answer to this question is a resounding no (which I fear that it may be), are there any other solutions? Or is a "proper" app in a browser - that is, one with a reasonable space requirement - completely infeasible at this time? Are we still waiting for the browsers to catch up with the requirements of development?

Edit: Just to add, I am aware that there is no limit on Cache-Manifest in the HTML5 specification, but the implementations all seem to limit it, and this will affect anything I attempt to write.

V.S.
  • 2,924
  • 4
  • 32
  • 43

5 Answers5

8

You can see more about limit capacity here: http://grinninggecko.com/developing-cross-platform-html5-offline-app-1/

KimKha
  • 4,370
  • 1
  • 37
  • 45
  • I also have a test on iOS device here: http://stackoverflow.com/questions/2908459/mobile-safari-5mb-html5-application-cache-limit/10195265#10195265 – KimKha Apr 18 '12 at 01:28
2

In case people are still wondering about this...

I've currently got an app that is 44MB of resources successfully downloaded and tested offline on Safari(6.1), Chrome(31), Firefox(26), iPad (ios7) and iPhone (ios6).

Only problem I have discovered is when you add the app to the home screen. I've decided this is because the app is too big and needs to expand the cache however there is no handling for this and it just ends with an error. Work around -> reload the app. Close, open, and resave cache = works.

Richard Herries
  • 280
  • 3
  • 4
0

Appcache size is limited to 5 MB in android devices. If you are creating hybrid application for android devices, you need to ensure that appcache should not exceeds 5MB. Otherwise, appcache download is getting failed once it reaches size limit.

The same issue wont occur in other devices (iphone, windows, blackberry etc).

Srini
  • 348
  • 1
  • 2
  • 17
0

Mobile

| Chrome | Android Browser | Firefox | Safari | Safari | iOS WebView | iOS WebView |
|   40   |       4.3       |   34    |   6,7  |   8    |     6,7     |      8      |
|    ~   |        ∞        |    ∞    |  300MB | 300MB  |    100MB    |    100MB    |

Desktop

| Chrome | Firefox |   Safari   |   Safari  |   IE   |   IE   |
|   40   |    34   |     6,7    |     8     |    9   |  10,11 |
|    ~   |  500MB  |      ∞     |     ∞     |    ?   |  100MB |

Reference Link

Behnam
  • 6,244
  • 1
  • 39
  • 36
  • The 'Reference Link' is out-of-date and relinked to web.dev. This page introduces some web technologies that save data in a browser. – Yang_____ Jul 03 '23 at 01:31
0

There is no limit according to the spec, but I believe the limit is more than 5 MB. See also Is there a size limit for HTML5 Manifest?

Community
  • 1
  • 1
Gaurav
  • 12,662
  • 2
  • 36
  • 34
  • Sorry, I'll add this to the original. I've researched and am aware there's no specification limit. This doesn't mean that in practice there is no limit! With regards to 5MB this is a number that I've pulled from the wiki article (that also suggests in some browsers its 10MB) – V.S. Jul 20 '11 at 14:48
  • In chrome I achieved appcache sizes op to 12MB – Laurens Rietveld Sep 14 '13 at 11:31