[whatwg] About bypassing caches for URLs listed in Fallback and/or Network section in a HTML5 Offline Web Application

Ian Hickson ian at hixie.ch
Thu Aug 12 16:08:01 PDT 2010

On Tue, 13 Jul 2010, Shwetank Dixit wrote:
> On Tue, 13 Jul 2010 19:28:55 +0530, Lianghui Chen <liachen at rim.com> wrote:
> >
> > In spec HTML5 for offline web application 
> > (http://www.whatwg.org/specs/web-apps/current-work/#offline) chapter 
> > 6.6.6, item 3, 4, 5 state that for resources that is in online 
> > whitelist (or has wildcard whitelist), or fallback list, it should be 
> > fetched "normally".
> > 
> > I would like to know does it mean the user agent (browser) should 
> > bypass its own caches (besides html5 appcache), like the WebKit cache 
> > and browser http stack cache?
> At least in Opera, it will still respect the browser's normal cache 
> header. So the network section header will just bypass the application 
> cache, and will load normally like any other web page, which means 
> respecting (i.e, not bypassing) the normal cache.

That's correct.

On Tue, 13 Jul 2010, Lianghui Chen wrote:
> Thanks, but that means once Opera starts with network connected, it 
> won't detect whether network is offline for offline web applications. 
> Doesn't it somehow defeat the purpose of "fallback" resource?

It will in fact work exactly like if you were online.

On Tue, 13 Jul 2010, Lianghui Chen wrote:
> So if the content for a "fallback namespace" is cached, which should be 
> if it starts with network connection and if server not explicitly use 
> "no-cache/no-store" cache control, then it will always be used, from 
> network or cache, and its mapping "fallback entry" will never be used, 
> even if it's offline?

Not while it's cached, right.

On Tue, 13 Jul 2010, Michael Nordman wrote:
> Like Opera, Chrome respects the http cache when first attempting to 
> "fetch normally" a resource that falls in a fallback namespace. I'm 
> reasonably certain WebKit does the same.
> "Normal" means just that... first do what the browser would do if there 
> was no Application Cache... only if that fails to produce a good 
> response, do something extra.

On Tue, 13 Jul 2010, Lianghui Chen wrote:
> Thanks, so it seems to make sure a fallback entry is used when offline, 
> cache-control has to be used.

If the resource is dynamic, that is the case, yes. (That or another 
similar solution, like making each fetched URI unique.)

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list