зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
f3624f163e
Коммит
42011a0e9a
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче