Closed Bug 1977619 Opened 10 months ago Closed 9 months ago

Request story images via moz-cached-ohttp:// protocol when inferred personalization is enabled

Categories

(Firefox :: New Tab Page, task)

task

Tracking

()

VERIFIED FIXED
143 Branch
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: nobody → sdowne
Attachment #9502590 - Attachment description: WIP: Bug 1977619 - Newtab wrap image urls with moz-cached-ohttp if personalized → Bug 1977619 - Newtab wrap image urls with moz-cached-ohttp if personalized
Pushed by sdowne@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/8077e9ca98ad https://hg.mozilla.org/integration/autoland/rev/1dcacb3d3e93 Newtab wrap image urls with moz-cached-ohttp if personalized r=home-newtab-reviewers,mconley
Regressions: 1981863
Pushed by smolnar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/2900361c57e0 https://hg.mozilla.org/integration/autoland/rev/f89a443b433d Revert "Bug 1977619 - Newtab wrap image urls with moz-cached-ohttp if personalized r=home-newtab-reviewers,mconley" for causing bc failures @ browser_topsites_annotation.js
Pushed by sdowne@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/762e9c490523 https://hg.mozilla.org/integration/autoland/rev/a58a531e16b4 Newtab wrap image urls with moz-cached-ohttp if personalized r=home-newtab-reviewers,mconley,maxx
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
QA Whiteboard: [qa-triage-done-c144/b143]

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.

Status: RESOLVED → VERIFIED
Blocks: 1986540
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: