Closed Bug 1826360 Opened 2 years ago Closed 2 years ago

Do not include sponsored top sites for about:home startup cache

Categories

(Firefox :: New Tab Page, enhancement)

enhancement

Tracking

()

VERIFIED FIXED
113 Branch
Tracking Status
firefox113 --- verified
firefox114 --- verified

People

(Reporter: nanj, Assigned: nanj)

References

(Blocks 1 open bug)

Details

(Whiteboard: [disco])

Attachments

(1 file)

Cached sponsored tiles will generate excessive impressions as they will be replaced by fresh ones soon. This change will avoid lots of hassle that we need to do to handle those unexpected impressions.

Whiteboard: [disco]
Assignee: nobody → najiang
Duplicate of this bug: 1825661
Pushed by najiang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4742cce495fd Do not include sponsored tiles for about:home startup cache r=mconley,thecount
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch

Hi Cosmin, Carmen, can anyone of you verify this fix with nightly or beta 113 when you get a chance? Thanks in advance!

STR

  • Make sure the home page startup cache feature is enabled by flipping the pref browser.startup.homepage.abouthome_cache.enabled. You can also turn on logging by setting browser.startup.homepage.abouthome_cache.loglevel to All. You can see logs about the cache creation in the browser console
  • Open the browser and then open a newtab page, ensure the sponsored tiles are displayed on the newtab page
  • Open the "browser console", you should be able to some logging emitted from AboutHomeStartupCache. The log message of Done writing to cache. means the about:home startup cache was successfully created
  • Restart the browser, and then verify the following things on the about:home page
    • Ensure that the about:home page is rendered from the cache. You can right click on the home page and choose "Inspect" on the context menu. On the "Inspector" tab, you should see <!--Cached: {{Cache Creation Datetime}} --> under the head tag. If not, then it's not a cached homepage, you might need to retry the last step to create the cache
    • Ensure that only two sponsored tiles are shown on the homepage. You might notice some delay in their appearance, which is expected. The cached homepage uses two placeholders and populates them with sponsored tiles once they are available
    • Ensure only two sponsored (instead of 4) tile impressions are sent. You will need to turn on PingCenter logging to verify this
Flags: needinfo?(cmuntean)
Flags: needinfo?(cfat)

Hi Nan!
I have verified this issue on the latest Nightly 114.0a1 build (Build ID: 20230411215906) on Windows 10 x64, macOS 12.4 and Linux Mint 20.
However, I have observed two behaviors:

  1. Restart the browser by manually close and reopening it.
  • With this scenarios the STR you provided worked as you described. See this video: Gdrive.
  1. Restart the browser using the browser console: Ctrl+Shift+J/Cmd+Shift+J and when the browser console is opened/focused press Ctrl+Alt+R/Cmd+Alt+R
  • With this scenarios the <!--Cached: {{Cache Creation Datetime}} --> is NOT displayed under the head tag. See this video: Gdrive.

Please let me know if I'm doing something wrong or if the scenario 2 is expected. Also at each browser restart the homepage is cached?

Flags: needinfo?(najiang)
Flags: needinfo?(cmuntean)
Flags: needinfo?(cfat)

Thanks so much for verifying this, Cosmin!

Restart the browser using the browser console: Ctrl+Shift+J/Cmd+Shift+J and when the browser console is opened/focused press Ctrl+Alt+R/Cmd+Alt+R

Hmm, With this scenarios the <!--Cached: {{Cache Creation Datetime}} --> is NOT displayed under the head tag. See this video: Gdrive.

If the <!--Cached: --> tag wasn't displayed there, meaning it was a regular homepage (rendered freshly at browser startup). There are a few cases in which Firefox won't use the cached homepage, perhaps including this one. But that's fine, the point of this patch is to ensure that Firefox won't include sponsored tiles in the cache, and sponsored tiles should be rendered live at the browser startup. So, I think we're good here :)

Flags: needinfo?(najiang)

Thanks, Nan! Considering this I will mark this bug as Verified - Fixed.

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

Attachment

General

Created:
Updated:
Size: