Request story images via moz-cached-ohttp:// protocol when inferred personalization is enabled
Categories
(Firefox :: New Tab Page, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox143 | --- | verified |
People
(Reporter: mconley, Assigned: thecount, NeedInfo)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
With bug 1974803 closed, we can now request images over OHTTP, and should do so when inferred personalization is enabled.
Documentation for the new protocol is here: https://firefox-source-docs.mozilla.org/browser/components/mozcachedohttp/docs/index.html
This can be done by simply changing the URL of the <img>'s loading the story / sponsor images (and the publisher favicon images!)
One way to do that is here: https://searchfox.org/mozilla-central/rev/ac81a39dfe0663eb40a34c7c36d89e34be29cb20/browser/extensions/newtab/content-src/components/DiscoveryStreamComponents/DSImage/DSImage.jsx#121-127
By changing this to something like:
let proxyImg = `https://img-getpocket.cdn.mozilla.net/${width}x${height}/${smart}filters:format(jpeg):quality(60):no_upscale():strip_exif()/${encodeURIComponent(
url
)}`;
return `moz-cached-ohttp://newtab-image/?url=${encodeURIComponent(proxyImg)}`;
Is it a bit strange to encode a URI component inside of an encoded URI component? Yes, perhaps, but that's what we get for protections in layers like this.
| Assignee | ||
Comment 1•10 months ago
|
||
| Assignee | ||
Updated•10 months ago
|
Updated•10 months ago
|
Comment 4•9 months ago
|
||
Backed out for causing bc failures @ browser_topsites_annotation.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/f89a443b433de4f506261d031ea0a762ef130c48
Comment 6•9 months ago
|
||
| bugherder | ||
Updated•9 months ago
|
Comment 7•9 months ago
|
||
I'm marking this bug as Verified Fixed for Nightly 143.0a1 as it is currently tested in https://mozilla-hub.atlassian.net/browse/QA-4101 and no issues were found so far in the Nightly 143 checkpoint phase.
Updated•9 months ago
|
Description
•