-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refresh()
method on adapters
#159
Comments
Thanks for the suggestion. It's something we'll need to add to the backlog, but will require a bit of work and testing of each adapter. |
@nickjacob is it possible to change the AOL/OpenX adaptor, so that they don't load the SDK on each request? It's more efficient that way as well. It may not be possible with their code today, but we can make this as a requirement, so bidders upgrade their adaptors. |
we could do something like AMP does internally, like: loadService(window, 'http://adtech.us/script.js', function () {
window.ADTECH();
});
function loadService(_global, src, callback) {
// scripts are loaded by the global passed in, so we could
// load a script in an iframe if we wanted to
var _scriptLoad = _global._scriptLoad || (_global._scriptLoad = {});
if (!_scriptLoad[src]) {
_scriptLoad[src] = [];
// modify loadScript to take a window to load w/i
loadScript(src, function () {
function _call(f){ return f(_global) };
utils._each(_scriptLoad[src], _call);
_scriptLoad[src].push = _call;
}, _global);
}
_scriptLoad[src].push(callback);
} I think this would be good in general but idk if it would solve for all refresh() scenarios |
@nickjacob |
Closing, reopen if new info. |
Feature/PLMP-261 running unit test on saucelabs
Because some adapters load SDKs (AOL, OpenX) on
callBids()
, and different bidders have different requirements when requesting an additional pageview/auction, I was thinking it might be helpful to have an optionalrefresh(params)
method in the adapter interface, so we can help minimize the impact during infinite scroll/slideshows & have best possible integrations on subsequent pageviews. For example the adtech adapter might look like:The text was updated successfully, but these errors were encountered: