WebP and content negotiation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux