AppCache is notoriously broken[0] (or really hard to work with), which is one of the reasons that the new ServiceWorker API was created[1]. ServiceWorker allows you to run a script in the background that can intercept network requests for specified paths, allowing you to create a pretty solid offline strategy (it also does some other interesting things, like push notifications, geofencing, and background sync).
There was a short video about ServiceWorker at the recent Google I/O that you can check out for an overview[2].
Well, it's "new" in the same way that HTML5 is new. It's been around for a few years.
The last time period that I played around with it was when iOS 3 was out, and it was horribly buggy (if you failed to download all of the things listed in the cache in the first go, then it would break and would refuse to ever try again). By iOS 4 it was less broken, but still weird.
Since it's been out there for a while it would probably be difficult to remove. Because of its brokenness I doubt that it ever got much usage, but there is probably some people out there that rely on it.
What I hope is that after ServiceWorker is better supported, someone can build out the old AppCache behaviour in JavaScript using the ServiceWorker APIs, and then we can use that for compatibility and remove AppCache from the browser itself.
Comments
AppCache is notoriously broken[0] (or really hard to work with), which is one of the reasons that the new ServiceWorker API was created[1]. ServiceWorker allows you to run a script in the background that can intercept network requests for specified paths, allowing you to create a pretty solid offline strategy (it also does some other interesting things, like push notifications, geofencing, and background sync).
There was a short video about ServiceWorker at the recent Google I/O that you can check out for an overview[2].
[0]: http://alistapart.com/article/application-cache-is-a-doucheb...
[1]: https://github.com/slightlyoff/ServiceWorker/blob/master/exp...
[2]: https://www.youtube.com/watch?v=4uQMl7mFB6g
AppCache is relatively new right? Is there no chance of pulling it out of the wild before making a headache in 20 years?
Well, it's "new" in the same way that HTML5 is new. It's been around for a few years.
The last time period that I played around with it was when iOS 3 was out, and it was horribly buggy (if you failed to download all of the things listed in the cache in the first go, then it would break and would refuse to ever try again). By iOS 4 it was less broken, but still weird.
Since it's been out there for a while it would probably be difficult to remove. Because of its brokenness I doubt that it ever got much usage, but there is probably some people out there that rely on it.
What I hope is that after ServiceWorker is better supported, someone can build out the old AppCache behaviour in JavaScript using the ServiceWorker APIs, and then we can use that for compatibility and remove AppCache from the browser itself.