KEMBAR78
Core: do not poll for some window dimensions by dgirardi · Pull Request #13916 · prebid/Prebid.js · GitHub
Skip to content

Conversation

@dgirardi
Copy link
Collaborator

Type of change

  • Bugfix

Description of change

With #12925 core always polls for every window dimension. Some of them (outerHeight/outerWidth, availHeight/availWidth and colorDepth) are more likely to be considered fingerprinting tools in https://github.com/duckduckgo/tracker-radar/blob/main/build-data/generated/api_fingerprint_weights.json

This PR breaks them out to their own library, extraWinDimensions, so that they do not appear in Prebid bundles that do not need them.

Other information

Related: #12060

@github-actions
Copy link

Whoa there, partner! 🌵🤠 We wrangled some duplicated code in your PR:

Reducing code duplication by importing common functions from a library not only makes our code cleaner but also easier to maintain. Please move the common code from both files into a library and import it in each. We hate that we have to mention this, however, commits designed to hide from this utility by renaming variables or reordering an object are poor conduct. We will not look upon them kindly! Keep up the great work! 🚀

@patmmccann
Copy link
Collaborator

does this fix for download page consumers?

@patmmccann patmmccann self-requested a review September 22, 2025 18:58
@patmmccann patmmccann self-assigned this Sep 22, 2025
Copy link
Contributor

@ncolletti ncolletti left a comment

Choose a reason for hiding this comment

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

this looks good, it addresses separating the calls outside of the bundle unless explicitly imported with a module that depends on it. nice work

@@ -0,0 +1,63 @@
import {canAccessWindowTop, internal as utilsInternals} from '../utils.js';

const CHECK_INTERVAL_MS = 20;
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we make this configurable? Does this seem aggressive?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In practice it's refreshed on every auction, as that's when modules query for dimensions.

@patmmccann patmmccann merged commit f8367ed into master Sep 22, 2025
30 of 33 checks passed
@patmmccann patmmccann deleted the fix-dimension-fingerprinting branch September 22, 2025 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants