Display Ad Server
Serve ads in standard fixed-size ad units
Native Ad Server
Serve native ads on your web page or app
Video Ad Server
Serve MP4 video ads as pre/mid/post-rolls
Maximize revenue for direct deals.
Optimize campaigns, real-time insights.
Why is asynchronous ad loading so important?
Written by Roy
Sep 18, 2020 • 6 min read
6. In Summary
It's been 5 years now that Google made page speed a ranking factor to determine its position in the SERP.
The faster a page loads compared to its competitors, the higher it will end up in Google's search result list.If you have ads on your page, asynchronous loading will play a significant role to achieve that goal.
Synchronous vs Asynchronous: What's the difference?
Synchronous loading means in this context: one after another, or serial loading.
Can you imagine the amount of time we're wasting here? While we may speak of a delay in the order of milliseconds, it's important to realize that Google does notice the difference. Even a 100 milliseconds delay may have a significant impact on your SERP rankings if it takes too long for your page to load. Your users may also be frustrated to see a white page and may leave without coming back.
Asynchronous loading, on the other hand, does not block page render and allows the browser to continue
processing the page and download other files at the same time. This approach makes much better use of the CPU and will speed things up significantly.
Are you a publisher with ads on your page?
If you're still using an old ad server that uses synchronous ad tags, you'll find out quickly. Google developed a tool to let you test the speed of your pages yourself.
Google is intervening against document.write()
If that script was an ad tag, this will mean that the user will not be served an ad. If you're a self-respected publisher, you don't want to miss out on opportunities.
A real-life example: let's do a test
To proof that async ad tags allows page content to load faster, I'm going to show you two screenshots of an experiment we've set up to support this claim.
Performance is measured by the amount of time (in milliseconds) after which the browser reports that the page is ready. Chrome's DevTools provides the essential information here. What we're interested in is the DOMContentLoaded() event fired by the browser. This event is shown as a blue line in the screenshots here below.
Test #1: Synchronous Ad Tag
File loaded synchronously. Blue line indicates DOM ready after 122 ms. The wrong way.
Test #2: Asynchronous Ad Tag
Now, look at the difference in loading time when the file is set to be loaded asynchronously. The browser states that the page is ready to interact with before the ad has been downloaded, after only 36 milliseconds. This means that the user can already use the page after a few milliseconds, while the script is being downloaded and executed in the background.
File loaded asynchronously. Blue line indicates DOM ready after 36 ms. The good way.
Why are ad servers still using synchronous ad tags?
Because it's a lazy method to make sure script A is loaded before script B is executed. That's it. Really. It's embarrassing to see there are still ad tech vendors who are using old technologies from the 90s. Any modern ad server, like AdGlare, will use an asynchronous approach to load ads as fast as possible without slowing down the page. It's a win for publishers, a win for users and a win for your CTR.
How can I recognize async scripts?
In general there are two methods to load a file asynchronously. The first one uses the HTML5 attribute async on a SCRIPT element. The advantage of this approach is that it's easy to implement with only one line of code:
<script async src='file.js'></script>
The second method is to append the script to a DOM element:
script.src = 'file.js'; var s = document.getElementsByTagName("script"); s.parentNode.insertBefore(script, s); })(); </script>
Whenever you add an ad tag to your page, make sure to verify it's loaded asynchronously.
Download this article as PDF?
No time to read the whole article? Download a free PDF version for later (no email required):
To link to this article, please use: