W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2009

[whatwg] clarification on ApplicationCaches "cache failure steps"

From: Andrei Popescu <andreip@google.com>
Date: Wed, 3 Jun 2009 16:14:09 +0100
Message-ID: <708552fb0906030814t68d8e1d5wd1a29cfa1e3f637c@mail.gmail.com>

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,
Received on Wednesday, 3 June 2009 08:14:09 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:12 UTC