httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michał Nazarewicz <min...@mina86.com>
Subject [users@httpd] WebP and content negotiation
Date Sun, 29 May 2016 16:43:59 GMT
Dear Apache users.

I’m trying to use content negotiation to serve WebP images.  Sadly,
browsers lie about what they accept (this is no new discovery).  For
example, Firefox sends the following header:

    Accept: image/png,image/*;q=0.8,*/*;q=0.5

despite the fact not knowing how to display WebP images.  The end
result is that if I have a .jpg and .webp file on my server, the
latter is being served to Firefox which is unable to decode it.

Chrome sends:

    Accept: image/webp,image/*,*/*;q=0.8

which is also a lie (it doesn’t accept APNG for example), but at least
it works when negotiating between JPEG and WebP files.

To work around this I would like to consider *.webp images in content
negotiation only if browser sent image/webp in Accept header
explicitly.  IS it possible?  Or perhaps there is a better way?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message