From c06ef745b14ef6ba980c2b3c352fdb6dd0b6c7b5 Mon Sep 17 00:00:00 2001 From: Demetrio Girardi Date: Thu, 20 Feb 2025 09:03:44 -0800 Subject: [PATCH] JS: prerendering settings --- dev-docs/publisher-api-reference/setConfig.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dev-docs/publisher-api-reference/setConfig.md b/dev-docs/publisher-api-reference/setConfig.md index 43957cffb6..23cb8c179e 100644 --- a/dev-docs/publisher-api-reference/setConfig.md +++ b/dev-docs/publisher-api-reference/setConfig.md @@ -125,6 +125,26 @@ pbjs.setConfig({ }); ``` +### Change prerendering behavior + +When a page is [prerendered](https://developer.chrome.com/docs/web-platform/prerender-pages), by default Prebid will delay auctions until it is activated. + +You can disable this behavior and allow auctions to run during prerendering with `allowPrerendering`: + +```javascript +pbjs.setConfig({ + allowPrerendering: true +}) +``` + +Alternatively you may delay execution of the entire command queue (not just auctions) until the page is activated, using `delayPrerendering`: + +```javascript +pbjs.delayPrerendering = true; +``` + +Note that `delayPrerendering` is a property of the `pbjs` global and not a normal setting; this is because it takes effect before (and delays) any call to `setConfig`. + ### Send All Bids