How Much Are Ad Servers Slowing the Web?
vipermac writes "Most of the times I have a problem with a Web page loading slow or freezing temporarily, I look down at the status bar and see that it's waiting on an ad server, Google Analytics, or the like. It seems to me that on popular Web sites the bottleneck is overwhelmingly on the ad servers now and not on the servers of the site itself. In my opinion we need a better model for serving ads — or else these services need to add more servers/bandwidth. Are there any studies on the delay that 3rd-party ad servers are introducing, or any new models that are being introduced to serve ads?"
problem solved.
For the reasons mentioned in the op I have several notorious slow adservers in my /etc/hosts. I don't know if they're still a problem, but doubleclick used to be horrible about taking 10 or 15 seconds to get their ad bits back to you. I'm not even particularly zealous about killing ads, but if you're stalling out my webpage then it's in /etc/hosts for you.
I read the internet for the articles.
What pisses me off are badly designed Flash ads. They use plenty of CPU power just to animate something completely useless. Last year Dell was running this ad on my local newspaper's site that took 80% of my CPU just to animate FALLING SNOWFLAKES. I complained to the website, and they took it down.
Some Flash ads barely take any CPU at all, and those are honestly fine by me, but some just hog my resources. The problem is that the people who DESIGN these ads typically have cutting-edge machines, so they don't know what it's like to run them on a shitty office machine. So, please, TEST your ads on a shitbox average computer before you force them on us!
Does it make you happy you're so strange?
It depends how the ad is served. If it's served as an external piece of JavaScript (using a script element), then most browsers will reach the script tag and won't render anything else until the script has been downloaded. This can cause a delay if the ad server is slow or down.
If the ad is served using an img, iframe or object element, you generally don't have this problem, as the browser can leave a space for the advert and carry on rendering the rest of the page.
I work for an ad serving company and most of the ads we serve are in iframe elements. The growing popularity of script elements (they seem to be used for most third-party ads now) confounds me. Generally, I'm continually surprised at how much control over the user experience most websites are willing to give to ad serving companies.
What ads are you guys talking about, I see barely any at all. *turns off ad block plus, refreshes* Holy crap! How do you even go online like this? You might as well just watch TV.
Another option is to use the "DEFER" option in the script tag. Any script within the tags will wait until the page loads before executing. I wish ad companies would start using that *sigh*
Dammit, I meant to post that anonymously!
My internet connection ain't free. If the ad folks want to use MY bandwidth they should pay me for the privilege.
Is it possible for browsers to render everything *else* on a page while awaiting the ads to be served?
Most ad systems seem to work by placing a <script> tag where you want the ad to appear which loads a script from the ad server that does a document.write() to insert the actual code. This is very bad practice (and explicitly disallowed for XHTML) but even Google do it (which sucks since I have to jump through all sorts of hoops to get AdSense to work on my XHTML site).
document.write() works by actually writing out HTML and feeding it into the parser and thus parsing the page must be suspended at that point until it's finished executing, so you can't render the page until the advert has loaded.
The _correct_ way to do this is for the ad-serving Javascript to actually modify the DOM tree. But that requires the ad server developers to not be lazy and have clue, which seems to be asking too much. (or alternatively, don't use Javascript at all).
http://blog.nexusuk.org