Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cache Manifest Size Limit and Web Apps

Tags:

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.

like image 519
V.S. Avatar asked Jul 20 '11 06:07

V.S.


People also ask

What does cache do in manifest file?

The CACHE section contains files you want to load and store on the user's machine. The first time the user loads your app, the browser will store all the files in the CACHE section of your app cache manifest.

Which line is mandatory in cache manifest file?

Which line is mandatory in cache manifest file? Explanation: For offline access, there is a text file named cache manifest. It lists the resources of the browser. For enabling application cache for any app we must include manifest attribute inside an html tag of the document like <html manifest=”text.


2 Answers

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

like image 103
KimKha Avatar answered Sep 26 '22 10:09

KimKha


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.

like image 20
Richard Herries Avatar answered Sep 26 '22 10:09

Richard Herries