W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2007

[whatwg] Offline Web Apps

From: Maciej Stachowiak <mjs@apple.com>
Date: Fri, 12 Oct 2007 15:21:11 -0700
Message-ID: <7D79E43A-99B9-40A8-A34B-04D01FFBDC67@apple.com>

On Oct 12, 2007, at 12:16 PM, Ian Hickson wrote:

> On Fri, 12 Oct 2007, Maciej Stachowiak wrote:
>>
>> The race-free approach would be to provide APIs to load resources  
>> only
>> from the cache and to error out immediately if the the request  
>> can't be
>> served locally.
>
> That's what the offline caching system does right now for any URI  
> not on
> the whitelist. We could have some sort of API (I'm not sure exactly  
> what
> it would look like) to modify the whitelist, adding items  
> temporarily or
> something?

That's a good point. However, it seems like the most likely candidate  
for a resource to use only if local is one that's in an opportunistic  
caching namespace in the manifest. At least, that is how I see  
Robert's map scenario working. And you wouldn't want either a real  
version loaded from the network or the fallback resource.

One possible approach would be an API to temporarily turn an  
opportunistic caching namespace into cache-only, such that any loads  
initiated while in this mode are served only if cached and fail  
otherwise, bypassing the possibility of network load or getting the  
fallback resources. Then you can handle the error in case the load  
fails.

Regards,
Maciej
Received on Friday, 12 October 2007 15:21:11 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:37 UTC