[whatwg] <link rel=icon width="" height="">
Maciej Stachowiak
mjs at apple.com
Tue Apr 29 23:27:43 PDT 2008
On Apr 29, 2008, at 11:17 PM, Jeff Walden wrote:
> Ian Hickson wrote:
>>> This is a proposal to add "height" and "width" attributes to <link>
>>> specifically for the case of rel=icon, so that authors can provide
>>> multiple icons and let the UA decide which to use based on their
>>> size
>>> (without having to download them all to find out which is best).
>>>
>>> Opinions?
>
> Given that <link/> is more intended as a generic element, I'm
> somewhat leery of adding attributes specifically for one individual
> use of it. If you're going to add an attribute (but see below), I
> think it makes sense that it be something that any use of <link/>
> could use to store extra data -- so an opaque attribute whose
> semantics are specified by the rel attribute of the link.
>
>
> Maciej Stachowiak wrote:
>> I would suggest a sizes attribute which can take a list of sizes
>> (with x as a width/height separator), or a keyword such as "any" or
>> "scalable" to indicate a scalable format suitable for any size.
>> <link type="icon" type="application/svg" sizes="any"
>> href="whatwg.svg">
>> <link type="icon" type="image/microsoft.vnd.icon" sizes="16x16
>> 32x32" href="whatwg.ico">
>> <link type="icon" type="image/x-apple-icons" sizes="16x16 32x32
>> 64x64 128x128 256x256 512x512" href="whatwg.icns">
>> <link type="icon" type="image/png" sizes="59x60" href="whatwg.png">
>
> This might require that existing browsers cope correctly (or exploit
> duplication/error behaviors), but could a MIME parameter address
> this without needing another attribute at all? That's the most
> narrowly scoped change I can imagine that would address the need.
>
>> <link rel="icon" type="application/svg; sizes=any" href="whatwg.svg">
>> <link rel="icon" type='image/microsoft.vnd.icon;
>> sizes="16x16,32x32"' href="whatwg.ico">
>> <link rel="icon" type='image/x-apple-icons;
>> sizes="16x16,32x32,64x64,128x128,256x256,512x512"'
>> href="whatwg.icns">
>> <link rel="icon" type="image/png; sizes=59x60" href="whatwg.png">
>
> Restrictions on what a parameter value may be (basically can't
> contain any separators or whitespace) are a touch confounding here
> because you don't have any separators unless you quote; that
> probably factors into the equation here.
I'm not against using a MIME parameter per se, but it would have to be
x-prefixed (unless we register it) and I'd strongly prefer a syntax
that does not require use of nested quotes.
Regards,
Maciej
More information about the whatwg
mailing list