[whatwg] clarification on ApplicationCaches "cache failure steps"

Andrei Popescu andreip at google.com
Wed Jun 3 08:14:09 PDT 2009


I have a question about the Application Caches update process:


In the event of a failure during the update process (e.g. some error
reported when attempting to save the downloaded resources to stable
storage), the spec says the "cache failure steps" should be run:


However, I am not sure it is perfectly clear what should happen after
that. If all the resources have been successfully downloaded but could
not be saved to stable storage, the newest application cache is
actually functional (as all of its resources are available in RAM).
Step 4 of the "cache failure steps" says:

"If cache group has an application cache whose completeness flag is
incomplete, then discard that application cache."

IMHO, the fact that the application cache is functional (can be used
to serve content) before its resources were persisted to stable
storage is actually an implementation detail. As far as the spec is
concerned, such a cache is still incomplete, so it should be
discarded, right? But what should happen in the case that, prior to
the update process, there was another "newest cache"? Should the UA
continue to use it? Or should it fallback to the network? I can see
reasons for doing either but I was wondering if this should be agreed
on and written in the spec. Or maybe it is in the spec and I missed

This question appeared while trying to fix the following bug in WebKit:


Many thanks,

More information about the whatwg mailing list