what if tomorrow every site would start using HTML5's application cache? this is an interesting question between there is a quite important difference between
storing, and while HTML5 technically treats offline applications as caching rather than storing, it is interesting to look at the differences in principle, in their design trade-offs, and in the influence then might have on how successful HTML5 offline applications might become
it's probably fair to say that currently, offline web apps are very rare. apple tried to push them before they allowed native apps on the iPhone, but given the current app craze it's almost in their best interest to not promote the iPhone's offline web app capabilities anymore. android also supports offline web apps, but the browser (at least in 2.1) seems to have problems with reliably firing the relevant events (which is even worse on the iPhone because going offline often requires leaving the browser, and that will stop the browser process anyway). in firefox, it is also supported, but there is a user confirmation popping up, and there does not seem to be any UI support for figuring out which sites have stored data. safari does a better job at that, it allows to explore the local storage that has been used, but there does not seem to be an interface to find pages that use the app cache.
it is obvious that the current state of implementations is in an early stage and rather inconsistent, which is understandable given the lack of popularity for offline web apps.
given that mobile safari's caching is so bad, some web developers suggest to (mis)use app cache to improve the likelihood that mobile safari will do some useful caching. but this approach is hard to deploy for dynamic apps, because the caching information is not carried in HTTP, but in some HTML5-specific file, which means that this file has to be updated and reprocessed by the browser every time a new resource should be cached. that's the price of HTML5's approach to pull caching into the HTML layer (where it very likely does not belong). but let's assume web developers worldwide start doing this, because better caching on mobile devices results in a dramatically improved user experience. mobile safari would then very soon run into issues of having too much to store, and would have to purge cached pages from the app cache as well because of some upper limit of cache capacity. that might also mean that some web app that the user really wanted to use offline might get purged from the cache.
the reason for this problem is that there currently is no way how a user is supposed to confirm that a web app should have the right to use the app cache and local storage (firefox is the only browser implementing such a confirmation). mobile safari might implement a different policy in how it handles apps depending on whether they are merely bookmarked, or
installed in the iPhone UI. while this probably should be the difference between whether an offline web app is cached (i.e., might be purged if storage space runs low) or stored (i.e., is never purged and thus treated like a locally installed app), maybe it would be useful to have a more well-defined model for this, so that browsers would behave consistently.
in browsers not as integrated into the OS as mobile safari, the browser itself might have a
springboard that would show all
installed offline apps, and these apps would never expire from the cache until explicitly
de-installed (removed), and they probably implicitly should get the permission to use local storage which also would never expire. The problem with this approach is that it produces a very different experience from the usual web experience, but it seems to me that if you want offline web apps to become useful and popular, they need a more well-defined framework and more dependability. if i want to use a web app offline, i have to be willing to give it some resources, but i also want to have control over what i did previously, and i want to be able to monitor and revoke permissions.
from the research side of things, it would be interesting to look into how to bridge this typical HTML5 approach of building an
app that just does whatever it has to do, with REST, the architectural style of the web. would it be possible to develop frameworks (maybe layered on top of local storage) that would allow apps to transparently (within certain boundaries, of course) interact with local storage as if they were connected? and then they could simply
sync when the browser goes to online mode? building this would definitely require a number of trade-offs, but having a framework that would support a RESTful and thus web-friendly way of building apps that could more easily switch between offline and online mode, that might be the one thing that's missing to make offline web apps more easy to develop.
for the user, there still is this basic uncertainty what exactly the browser is storing in terms of app cache and local storage, how to grant or revoke permissions for that, and how to understand and control the fundamental difference between
storing data. it's perfectly fine for a cache to be transparent, but not so much for storage.