Re: [css3-images] image() function and file formats

On Tue, Jan 18, 2011 at 1:37 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> The CSS3 Images spec
> <http://dev.w3.org/csswg/css3-images/#image-notation> defines the
> image() function, which allows authors to specify multiple images,
> representing the first one that doesn't give an error (that is, if the
> first one 404s or similar, the browser will instead fetch the second
> one in the list, etc.).
>
> Right now, the image() function has a form of light type-sniffing via
> the file extension, such that if the UA sees an image with an
> extension corresponding to a type of image the UA *knows* it doesn't
> support, it can skip trying to load the image altogether and just jump
> to the next image in the list.


I think if a UA really doesn't want to load a given image using whatever
rule it feels inclined to, then it can go ahead to the next image in the
list.  I don't think the extension language is necessary in the spec to
allow a UA to skip .svg (for example) if it really wanted to.  I also agree
that skipping URLs based on extension is probably not a great idea, but that
seems like more of a quality of implementation issue.

- James

Received on Tuesday, 18 January 2011 22:28:14 UTC