Bug 1503653 - Part 2. Enable WebP by default. r=tnikkel

Bug 1249474 suggested that we add image/webp to the front of the Accept
header for images, to indicate to servers that we actually support WebP.

Differential Revision: https://phabricator.services.mozilla.com/D8120
This commit is contained in:
Andrew Osmond 2018-10-09 10:01:26 -04:00
Родитель f3624f163e
Коммит 42011a0e9a
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -9,7 +9,7 @@ function handleRequest(request, response)
file.append("test");
file.append("mochitest");
if (request.getHeader("Accept") == "*/*") {
if (request.getHeader("Accept") == "image/webp,*/*") {
file.append('blue.png');
} else {
file.append('red.png');

Просмотреть файл

@ -4707,7 +4707,7 @@ pref("image.decode-immediately.enabled", false);
pref("image.downscale-during-decode.enabled", true);
// The default Accept header sent for images loaded over HTTP(S)
pref("image.http.accept", "*/*");
pref("image.http.accept", "image/webp,*/*");
// The threshold for inferring that changes to an <img> element's |src|
// attribute by JavaScript represent an animation, in milliseconds. If the |src|
@ -4790,7 +4790,7 @@ pref("image.multithreaded_decoding.limit", -1);
pref("image.multithreaded_decoding.idle_timeout", 600000);
// Whether we attempt to decode WebP images or not.
pref("image.webp.enabled", false);
pref("image.webp.enabled", true);
// Limit for the canvas image cache. 0 means we don't limit the size of the
// cache.