ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.89k stars 3.89k forks source link

I2D integration.js/f.js for 3p iframe #35349

Open powerivq opened 3 years ago

powerivq commented 3 years ago

Summary

We wish to change to not make available integration.js/f.js for purpose of 3p iframe bootstrapping.

Motivation

f.js has been available for third party iframe users to bootstrap various ads or vendor iframe (eg facebook, twitter). To date, it is possible for publishers to host a custom remote.html https://github.com/ampproject/amphtml/blob/main/extensions/amp-ad/amp-ad.md#running-ads-from-a-custom-domain themselves, which references to f.js to bootstrap the ads iframe.

However, f.js has all 3p vendor bootstrapping code in one file, and is unnecessarily big. Since we have been starting to compile per-vendor js bootstrapping files, we would like publishers to change to use per-vendor js file instead of universal f.js to improve the performance, and relieve amp team from having to maintain f.js in the long run.

Impact on Existing Users

Publishers who use amp-3p-iframe-src meta should check their own remote.html, and change the reference to f.js to whatever vendor they want to use. e.g if they want to use kargo, they should replace f.js with kargo.js

Alternative Implementation

n/a

Additional Context

No response

Notifications

/cc @ampproject/wg-approvers @ampproject/wg-monetization

cramforce commented 3 years ago

Given that we allows direct reference from custom remote.html files, I think we will need to maintain backward compat for a significant amount of time. I think we can achieve the performance win in the "managed" environments while still shipping the legacy file for compat. We should then add a deprecation file and look at traffic to the URL. I do, however, think it'll take a year+ to really move. An alternative would be to change the legacy file to turn into a loader of the underlying vendor file.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.