[whatwg] Offline Web Apps

Maciej Stachowiak mjs at apple.com
Fri Oct 12 15:21:11 PDT 2007


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




More information about the whatwg mailing list