W3C home > Mailing lists > Public > www-style@w3.org > April 2004

Re: Behavior of <meta> elements linking in stylesheets

From: Ian Hickson <ian@hixie.ch>
Date: Sat, 10 Apr 2004 19:56:28 +0000 (UTC)
To: Boris Zbarsky <bzbarsky@MIT.EDU>
Cc: www-style@w3.org
Message-ID: <Pine.LNX.4.58.0404101948450.14899@dhalsim.dreamhost.com>

On Sat, 10 Apr 2004, Boris Zbarsky wrote:
> Say I have, in my (X?)HTML document, the following markup:
>    <meta http-equiv="link"
>          content='<http://whatever/something.css>; rel="stylesheet"'>

Note that technically HTML does not say that UAs may handle <meta
http-equiv> elements. It only says that servers may.

> How does this node behave from the point of view of the CSSOM? Does it
> implement the LinkStyle interface?  Does removing the node from the DOM
> remove the sheet from document.styleSheets?  Does changing the
> "http-equiv" or "content" attribute via the DOM change which sheet is
> applied and whether it's applied?
> That is, does this behave exactly the same as:
>    <link rel="stylesheet" href="http://whatever/something.css">
> Or does it behave more like an actual
>    Link: <http://whatever/something.css>; rel="stylesheet"
> HTTP header (which cannot be affected via the DOM, etc)?

Since HTML only says that http-equiv makes it possible for servers to find
new HTTP headers (despite the fact that to my knowledge, no server has
ever done so, and most UAs interpret them themselves), I would say that
the intention is that they are equivalent to HTTP headers, not <link>
elements. However, the HTTP specs that define Link: say that they are
exactly equivalent to <link> elements. So logically <meta> elements, which
really _can_ be implemented identically to <link> elements, should be.

So in conclusion, the specs don't say, but if you're willing to spend the
time to look at this in the first place, then <meta> should work the same
as <link> while it has http-equiv="Link".

(I could argue this either way. I argued it as above because that is the
way you said you were leaning. If you want me to argue it the other way,
just say that implementing the above is too hard.)

Ian Hickson                                      )\._.,--....,'``.    fL
U+1047E                                         /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'
Received on Saturday, 10 April 2004 15:56:31 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:12 UTC