Re: [DRAFT] QA Tips - Gif versus PNG

On Thu, 18 Sep 2003, Karl Dubost wrote:

> > QA WG pages use W3C-produced GIFs as well. For example, "XHTML
> > conformant icon" on the QA Matrix page:
> > 	http://validator.w3.org/images/vxhtml10
>
> both.  We are making content negociation and the browsers are
> receiving what they are asking.
>
> http://validator.w3.org/images/vxhtml10.png
> http://validator.w3.org/images/vxhtml10.gif

Not exactly. W3C server seems to prefer GIF to PNG, which means that
vast majority of your clients will not be served a PNG image:

    GET /images/vxhtml10 HTTP/1.1\r\n
    User-Agent: Opera/6.12 (UNIX; U)  [en]\r\n
    Host: validator.w3.org\r\n
    Accept: text/html, image/png, image/jpeg, image/gif, image/x-xbitmap, */*\r\n
    Accept-Charset: windows-1252, utf-8;q=1.0, utf-16;q=1.0, iso-8859-1;q=0.6, *;q=0.1\r\n
    Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0\r\n
    Connection: Keep-Alive, TE\r\n
    TE: deflate, gzip, chunked, identity, trailers\r\n
    \r\n

    HTTP/1.0 200 OK\r\n
    Date: Thu, 18 Sep 2003 18:51:53 GMT\r\n
    Server: Apache/1.3.27 (Unix)\r\n
    Content-Location: vxhtml10.gif\r\n
    Vary: negotiate,accept\r\n
    TCN: choice\r\n
    Cache-Control: max-age=604800\r\n
    Last-Modified: Fri, 14 Sep 2001 02:00:46 GMT\r\n
    ETag: "1a178-929-3ba164ce;3de306b7"\r\n
    Accept-Ranges: bytes\r\n
    Content-Length: 2345\r\n
    Content-Type: image/gif\r\n
    X-Cache: MISS from 10.0.0.1\r\n
    Connection: keep-alive\r\n
    \r\n
    Data (1053 bytes)

0000  47 49 46 38 39 61 58 00 1f 00 f7 ff 00 ff ff ff   GIF89aX.........

In the above example, my browser says it supports both GIFs and PNGs
(PNG is even listed first in the Accept header), and gets a GIF back.
If no explicit preference is given, the server returns a GIF as well.

Thus, for any agent that supports both formats, a GIF would be served.
Consequently, there is no sane way to receive a PNG in the response
because most browsers that support PNG would support GIF as well! From
[most] users point of view, W3C is serving GIFs.

> You will notice all along the tip that we do not say "Don't use
> GIF".  We are just giving information about the two formats and the
> benefits of PNG.

The tip is so biased towards PNGs that the implied advice is clear,
IMO.

Alex.

Received on Thursday, 18 September 2003 15:23:00 UTC