[whatwg] Empty <html manifest=""> attribute handling.

On Fri, 31 Jul 2009, Michael Nordman wrote:
> 
> How empty <html manifest=""> attribute values are handled in the section 
> 9.2.5.5 may want some massaging.
> 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#parser-appcache
> 
> > If the?Document?is being loaded as part of?navigation?of a?browsing 
> > context, then: if the newly created element has a?manifest?attribute, 
> > then?resolve?the value of that attribute to an?absolute URL, relative 
> > to the newly created element, and if that is successful, run 
> > the?application cache selection algorithm?with the resulting?absolute 
> > URLwith any?<fragment>?component removed; otherwise, if there is no 
> > such attribute or resolving it fails, run the?application cache 
> > selection algorithm?with no manifest. The algorithm must be passed 
> > the?Document?object.
> 
> This ends up passing the value of the document url into the cache 
> selection algorithm as the manifest url, which will initiate an update 
> and all that.

Correct.


> A couple of things that may make sense.
> 
> 1) equate <html manifest=""> with <html>.... treat empty as 
> non-existent.
> 
> 2) don't resolve the url if the attribute value is empty, pass an empty 
> url to the cache selection algorithm, and have that algorithm flag such 
> resources as foreign if it was loaded from an appcache
> 
> Both of these prevent the initiation of an update that is doomed to 
> fail.

I don't see much point in hardcoding defenses against this case. If it 
fails it fails.

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

Received on Tuesday, 11 August 2009 17:54:57 UTC