Closed Elena6918 closed 1 year ago
When the browser loads code from BiddingURL, does this mean the buyer server will receive a request?
Potentially, depending on how that buyer has configured their HTTP caching behavior via Cache-Control
HTTP headers. If the browser loads the bidding script from cache the buyer server will not receive a request.
What happens if one buyer changes the code in the BiddingURL during the auction?
The browser will likely load the bidding script once for all stored interest groups that have identical owner
and biddingLogicUrl
fields, so changes to the bidding script that happen during the auction will likely not take effect until the next auction.
Is your concern related to unintended side effects of changing bidding scripts? or is it related to how buyers learn and get notified about auctions being run?
It's related to how buyers learn and get notified about auctions being run.
For example, if the buyers want to change their bidding logic according to how many auctions have been run so far and the time of the day, can they get that information before one auction starts instead of waiting for reports? According to your response, the buyer can configure their server's Cache-Control
header to disable cache so that the server will know every time when an auction starts? Does disabling cache impact performance or anything else? What's the request query sent from the browser?
If multiple IGs have the same biddingURL, will this request be sent multiple times? If so, if the buyer changes the bidding code between requests, will the bidding code be updated for some IGs?
Rather than changing the bidding logic JavaScript code dependent on changing real-time information, like how many auctions have been run so far and the time of day, I would strongly recommend having fairly static bidding logic JavaScript code (that the browser caches) and instead putting logic in the bidding script to handle different conditions (e.g. time of day) or utilize FLEDGE's fetching of real-time data feature. I talk about the benefits of reusing bidding scripts here.
Thanks for your answer. An off-topic but relevant question on sending requests to bidding URL: When I set the cache policy to No-Cache
and win an auction, I will get a request to my bidding URL after the auction ends and before sendReportTo()
execute. Why did I get this request? At this phase, the worklet should still be able to access the content of the bidding URL?
If you're seeing post-auction requests to the bidding script URL with No-Cache
set, I imagine it's the browser loading up the reportWin()
script which is part of the same bidding script.
If that's the case, shouldn't the seller server get a request to decision URL as well before this request to load up the reportResult() script? I'm controlling both buyer servers and seller server and set the cache policy to No-Cache
, and I only see one request to the winner buyer's server.
The browser should not and should not make any promises about exactly when these scripts are requested, how many times, in what order, etc. These are all things where different browsers might make different choices and do whatever they feel is best for their own implementation.
Any assumptions that you make, about the exact details of when a script is requested, are things that may change in the future (if we change code in Chrome) and might not even be consistent right now (if they depend on other non-guaranteed things like when individual worklets are killed or re-started).
According to my understanding, when the seller initiates an auction by running runAdAuction(), the browser will look at IGs the user has and load code from buyers via BiddingURL in each IG.
When the browser loads code from BiddingURL, does this mean the buyer server will receive a request?
What happens if one buyer changes the code in the BiddingURL during the auction?