Header bidding and page load speed

Ad TechAlthough improving page load time is the second biggest reason to use header bidding vs. daisy chaining (after the increased revenue), it has its own problems when it comes to site speed. Due to the single-threaded nature of browser JavaScript runtime and the limited number browser / OS resources, header bidding is likely to add seconds to your average page load time.

The limitation that hurts page load speed the most is the “Max Connections” setting. For example, once Chrome has made ten outgoing http connections (to fetch static files like images, CSS, fonts, JS source files, or to make AJAX requests) it stops spawning new http clients. Publisher sites usually have hundreds of external resources (images, analytic scripts, video players, etc.) so they always have header bidding scripts fighting against each other for browser http clients and against the browser’s UI renderer that needs to paint the page.  Also, header bidding JavaScript libraries have to contact each bidding partner one by one, and they can only do this sequentially due to the single-threaded nature of JavaScript’s runtime engine.

And even if the partners return their bids at the same time, a browser can only process their responses sequentially – again, because JavaScript is single-threaded.

Add to the above a mix of network lags, a limited number of JavaScript threads to receive/parse/execute JavaScript code responses from demand sources, a CPU occupied with other tasks, and you might start experiencing delays in page load that range anywhere from one to sometimes fifteen seconds.

There are several things you can do to fight the page speed degradation and make ads appear quicker to increase your revenue.

— You can move other JavaScript libraries to the window.onLoad event handler to make sure header bidding code always has enough system resources to run.
— You can switch to HTTP/2 protocol to overcome the “10 http clients max” limitation. HTTP/2 multiplexes HTTP requests within a single TCP connection and as a result browser does not need as many HTTP clients.
— You can lazy-load images so header bidders are not competing against the total weight of the network queue. 

There’s a new hope though!

Lately both Google and Amazon announced their intent to move header bidding to the server-side. Server-side bidding makes the header bidding process less resource-demanding and the single-threaded nature of JavaScript irrelevant because there’s always going to be only one bidding request – to Amazon or Google. If anyone has the horsepower to perform dozens of simultaneous server-side requests on each page view, it’s Amazon AWS or GoogleCloud hardware data centers.

Lets see if Google & Amazon can actually deliver on their promise to push header-bidding server-side and make the Internet dramatically faster!

2 thoughts on “Header bidding and page load speed

Comments are closed.