-
Benachrichtigungen
You must be signed in to change notification settings - Fork 158
Add support for Save-Data
request header
#1258
Kommentare
To support Save-Data, we'll add 2 new quality levels:
To enable this feature, and also make the optimized friendly to CDN/proxy, we'll add a new option:
AllowVaryOn will list the headers which the optimized images can vary on. Currently it will support these: Accept, User-Agent, and Save-Data. It can also be "Auto" by which PageSpeed will pick the proper list of header depends on whether the request has Via header or not. |
@huibaolin great stuff, thanks! A couple of followup questions:
|
WebpQualityForSaveData will be defaulted to 50, which is the quality used in Chrome Data Saver. JpegQualityForSaveData will be set to match WebP 50. I'll run some experiments to find out the exact value. AllowVaryOn will be defaulted to "Auto". By "Auto" we'll try to use the most meaningful value for the user.
|
Fixes #1258 Squash-merge of huibao's work in 1fef4a, e68644, 5da54d, 6c0be2, b98bf9, 79eb6f, c0b22d, and b92ddc.
Fixes #1258 Squash-merge of huibao's work in ad2818b, 83c9607, 1fef4af, e686449, 5da54d8, 6c0be2e, b98bf9a, 79eb6fa, c0b22d1, b92ddc1, and f3959c5. Also: * Changes nullptr to NULL to support older compilers. * Fixes missing equals sign in kOptimizedImageInfoList definition Export more files for image resizing
https://httpwg.github.io/http-extensions/client-hints.html#the-save-data-hint
When the
Save-Data
header is present, PageSpeed should automatically adjust its filters and optimizations to reduce the amount of served bytes -- e.g. compress images with lower quality. Ideally, this should be an "on by default" behavior, but one that can be (re)configured by the site owner.The text was updated successfully, but these errors were encountered: