[whatwg] Application Cache, Application Cache, Application Cache
Jukka K. Korpela
jkorpela at cs.tut.fi
Sun Apr 17 04:43:52 PDT 2011
Edward Gerhold wrote:
> I came to the conclusion, the cache is linked too tightly to the
The manifest appears to be the heart of the matter, so by questioning its
tight connection to the application cache, you're questioning the
application cache itself. This may well be a good question.
> The cache is good how it is as long as it isn´t developed
> for dynamic websites and caches.
I'd like to see a simple summary of the benefits of an application cache, as
compared with normal caching - not with some hypothetical situation without
any caching. Even for a relatively stable application, the benefits don't
appear to be that great, though I might miss something. If you expect an
application to be updated rarely, you could set the HTTP headers to reflect
this, encourageing browsers into regarding cached copies as fresh for a long
time - or you might even let the normal guessing mechanisms (based on
Last-Modified etc.) take care of this.
An application cache means that
1) an author can specify a set of resources to be loaded when a page is
2) when online, the user's browser can check just the contents of the
manifest to decide whether the cached files can be used, instead of checking
the freshness of the individual files.
As a drawback, when _any_ change is made to any of the files, the manifest
needs to be modified and all user agents will have to download the entire
application (all files) when online next time.
I'm not very convinced of the benefits of this approach. Point (1) is
somewhat fictitional: you might just as well let the browser download the
files when the user uses the application for the first time. Admittedly, one
session might not cause all the files to be downloaded, since it might not
refer to all of them, especially if it is just a testing session. If this is
serious, then I'd expect to find a solution that lets the author specify a
list of files to be downloaded when an application is run, without affecting
caching in any other way.
Point (2) might be relevant if the application consists of a large number of
files, since otherwise the advantage is not that considerable. Basing the
caching on the _contents_ of the manifest file sounds almost like a joke -
why not let the browser just do a HEAD request and use Last-Modified to
decide whether the manifest needs to be fetched?
More information about the whatwg