Origins should be notified of image replacement |
||||||||
Issue descriptionClient-side Lo-Fi removes images and replaces them with rectangular placeholders. It needs a mechanism to inform origins that such replacement will occur on a page. For example, the Intervention header can be sent on all requests on a page. Minimally, the request should be sent on all JS requests, frame src requests, and XHR requests.
,
May 3 2017
,
May 5 2017
Looks like we can count on the CLIENT_LOFI_ON (or kClientLoFiOn) bit being set on the frame but it will not be set on the resource requests (gets cleared in WillSendRequest unless it is for an uncommitted main frame). So we could hook intervention header logic in RenderFrameImpl with check on frame's PreviewsState or could put in the logic in DataReductionProxyNetworkDelegate if we defined a new PreviewsState bit to carry the signal that the client intervention is enabled.
,
May 5 2017
I think the header would need to be added in Blink so that it can be accessed via JS. Adding it at content or net layer is probably too late.
,
May 8 2017
I agree with tbansal. I was hoping that the implementations of "Intervention" and "Save-Data" in Blink would serve as good implementation guides.
,
May 8 2017
Looks feasible to add check in same Blink method that sets "Save-Data" ( FrameFetchContext::AddAdditionalRequestHeaders()) if we add and use a method similar to RenderFrameImpl::ShouldUseClientLoFiForRequest() that is able to access the PreviewsState value on the frame.
,
May 9 2017
,
May 11 2017
Is the `Intervention` header defined somewhere? Is it something other browsers are expected to support as well in the future, or will it remain proprietary? From a content adaptation perspective, I think this is very valuable, but would be significantly more valuable as a standard :) Also, does this change require an Intent to Ship?
,
May 11 2017
The Intervention header was introduced here for a document.write intervention: https://github.com/WICG/interventions/issues/17 We want to coalesce that header in the near term. We need a better long term approach though. We do need to write an Intent to Ship for Image Replacement and include discussion about this mechanism to expose to origins. [Last August sclittle sent out the Intent to Implement with subject: "Intent to Implement: Support for Image Replacement in Blink"]
,
May 15 2017
,
May 15 2017
,
Jun 19 2017
Don't see CL entry here but was fixed here: https://chromium.googlesource.com/chromium/src/+/701e51d2fe0c63fa66953aac76417df7e218ace8 Wrt Intent to Ship, sclittle was updating the original Intent to Implement for Image Replacement.
,
Dec 5 2017
,
Dec 5 2017
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by dougarnett@google.com
, May 3 2017