Skip to content
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

Prebid Core: TTL counts only when page is active #11803

Merged
merged 4 commits into from
Jun 23, 2024

Conversation

mkomorski
Copy link
Collaborator

Type of change

  • Bugfix

  • Feature

  • New bidder adapter

  • Updated bidder adapter

  • Code style update (formatting, local variables)

  • Refactoring (no functional changes, no api changes)

  • Build related changes

  • CI related changes

  • Does this change affect user-facing APIs or examples documented on http://prebid.org?

  • Other

Description of change

Other information

#11268

@olafbuitelaar
Copy link
Contributor

isn't the bid TTL an hard cut off, from delivery? e.g. we've seen SSP's rejecting bids if the bid get's executed after delivery time + TTL expired. taking only focus time could attribute to executing the bid after it's ttl?

@dgirardi
Copy link
Collaborator

dgirardi commented Jun 18, 2024

@olafbuitelaar this doesn't change the effect TTL has on which bids are picked, it's to fix an edge case (#11268) where:

  1. bid cache cleanup is enabled (with minBidCacheTTL)
  2. a bid is selected as a winner and sent to the adserver
  3. focus is lost, browser pauses pending tasks
  4. focus comes back, the bid is past its TTL, the bid is dropped
  5. the now missing bid fails to render.

in theory it shouldn't matter since the bid expired, but many bidders don't really have TTLs (a lot just hardcode some random number) or don't enforce it.

@mkomorski mkomorski force-pushed the 11268-deferred-timeout-master branch from b485987 to ccf7b14 Compare June 19, 2024 15:27
setFocusTimeout(callback, timeOutOfFocus - startTime);
}
}, milliseconds);
return timerId;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the false return value came back!

@mkomorski mkomorski force-pushed the 11268-deferred-timeout-master branch from 6b12f54 to 5302580 Compare June 21, 2024 10:51
@patmmccann patmmccann merged commit 124fa0a into master Jun 23, 2024
5 checks passed
@patmmccann patmmccann deleted the 11268-deferred-timeout-master branch June 23, 2024 03:28
DecayConstant pushed a commit to mediavine/Prebid.js that referenced this pull request Jul 18, 2024
* 11268 TTL counts only when page is active

* refactor

* refactor due to performance optimization

* get rid of false timer id

---------

Co-authored-by: Marcin Komorski <marcinkomorski@Marcins-MacBook-Pro.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants