Re: Feedback on Image modules

On Dec 12, 2010, at 8:14 AM, Karl Dubost <karld@opera.com> wrote:

> Copying the spec content to have the context of the discusssion.
> 
>    If the URL for the image ends in a file
>    extension (a period followed by letters) of four
>    ascii letters ([a-zA-Z]) or less, then the UA
>    may skip trying to load images whose file
>    extension matches an image format it knows it
>    does not support.
>    – http://dev.w3.org/csswg/css3-images/#image-notation
> 
> This is the normative statement with a MAY if I understand. Just to clarify the statement, what does it mean 
> 
>    "trying to load images"
> 
> Either it loads it because there is a matching extension or it doesn't, but "trying to load" is not testable.

> * Second, what is happenning for all people serving their images without extension but with the right mime-type, be it from script or from static images? What would be the processing policy?

That is when it tries to load. It can skip '.tif' files if it knows it doesn't support TIFF files, but if it sees a '.php' image, it has to try to load it, ie, read enough to see if it is supported. 


> 
> 
> Let's say a User-Agent with Accept: image/gif, image/png  (*no support for SVG*). The CSS at the domain http://example.org/ contains this rule:
> 
>    background-image: image(wavy, wavy.php, wavy.svg, wavy.gif);
> 
> 1. http://example.org/wavy 
>   Content-Type: image/png
> 2. http://example.org/wavy.php
>   Content-Type: image/gif 
>   (because it is the first in the list of user agent 
>   Accept header, the script generates the image 
>   dynamically depending on the user agent preferences.)
> 3. http://example.org/wavy.svg
>   Content-Type: image/svg+xml
> 4. http://example.org/wavy.gif
>   Content-Type: image/png
>   (a program converted some gif images into png and 
>   added the extension but the file is served without 
>   extensions as the first one.)
> 
> What is happening?
> 
> 
> [1]: http://dev.opera.com/articles/view/mama-images-elements-and-formats/
> 
> -- 
> Karl Dubost - http://dev.opera.com/
> Developer Relations & Tools, Opera Software
> 
> 

Received on Sunday, 12 December 2010 17:12:52 UTC