Re: LINK only in HEAD?

On Wed, 27 Nov 2013, Dimitri Glazkov wrote:
> On Wed, Nov 27, 2013 at 12:41 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> >
> > http://www.whatwg.org/specs/web-apps/current-work/ 
> > multipage/sections.html#the-body-element says its content model (this 
> > part is normative!) is 
> > http://www.whatwg.org/specs/web-apps/current-work/ 
> > multipage/elements.html#flow-content which is a whitelist of things 
> > that are allowed in <body> and contains:
> >
> >   link (if the itemprop attribute is present)
> >
> > So <link> without @itemprop is not allowed as flow content.
> 
> I see. Do you know why? It seems that all browsers support it anywhere, 
> and this looks like just validator hoop-jumping.

The spec has a detailed section that talks about why we have authoring 
conformance criteria like this:

   http://whatwg.org/html#conformance-requirements-for-authors

The basic idea is to try to help authors by catching things that they 
probably didn't intend. In the case of <link> in body, the main problem is 
late loading of style sheets leading to poor performance and flicker.

If there are use cases where best practice would involve a <link rel> in 
the <body>, we can always change the rules here.

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

Received on Thursday, 28 November 2013 22:07:36 UTC