Skip to content

Commit

Permalink
JS: prerendering settings
Browse files Browse the repository at this point in the history
  • Loading branch information
dgirardi committed Feb 20, 2025
1 parent 2908dea commit c06ef74
Showing 1 changed file with 20 additions and 0 deletions.
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

0 comments on commit c06ef74

Please sign in to comment.