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 a94bbad
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 the page is activated.

You can disable this behavior with `allowPrerendering`:

```javascript
pbjs.setConfig({
allowPrerendering: true
})
```

Alternatively you may delay execution of the entire Prebid.js queue (not just auctions) with `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 (and delays) any call to `setConfig`.

### Send All Bids

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

0 comments on commit a94bbad

Please sign in to comment.