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

JS: prerendering settings #5901

Merged
merged 1 commit into from
Feb 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions dev-docs/publisher-api-reference/setConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

<a name="setConfig-Send-All-Bids"></a>
Expand Down