[whatwg] clarification on ApplicationCaches "cache failure steps"

Hi,

I have a question about the Application Caches update process:

http://dev.w3.org/html5/spec/Overview.html#application-cache-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:

http://dev.w3.org/html5/spec/Overview.html#cache-failure-steps

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
it?

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

https://bugs.webkit.org/show_bug.cgi?id=25562

Many thanks,
Andrei

Received on Wednesday, 3 June 2009 08:14:09 UTC