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?"
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.
There are still ads on the internet? I sometimes forget, until I have to open up IE.
Or if you like ads (sometimes the google ones are amusing, or you want to support the website you're visiting), turn on HTTP Pipelining. It'll handle all of your requests simultaneously instead of one after the other.
(A)bort, (R)etry, (I)gnore?_
DEFER is your friend. The scripts won't load until after the page loads.
Javascript is usually involved. Because Javascript is single-threaded and does in-order execution, if an ad uses Javascript, then waiting on that javascript to finish will hold up the rest of the page.
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.
This was greek to me. Here's how.
c onfig
Turn it on this way:
http://www.mozilla.org/support/firefox/tips
And information about how to access the secret tools (Why didn't I know this until now? I must be lame.)
http://www.mozilla.org/support/firefox/edit#about
This was OK on narrowband/dialup connections (in fact, most browsers used to render the page between elements by default, so that it would show you the whole page, then re-render as various images or other elements were downloaded and ready to display -- although as connections got faster relative to rendering time, most browsers switched to only rendering the page once when it was complete), but it sucks on broadband. As the amount of time each data transfer takes drops relative to the time required to establish the connection, the establishment and resetting of the connections for each page element becomes more "expensive."
So in HTTP/1.1 they introduced a way of making multiple requests in one connection. (It may have predated HTTP/1.1 but I think that was when it was first formalized). Basically the web browser opens a connection to the server and make multiple requests at once. Then the server will respond with all the requested elements. Then the connection will close. This is considered kosher and non-abusive because it doesn't require spawning a whole lot of connections at the server; everything is done in one.
However this isn't enabled in default in Firefox; you have to go into the about:config page and turn it on, and set the number of requests per connection to something reasonable (I think 8 is the max).
Also, it requires a certain amount of intelligence on the part of the browser to do this correctly. There are certain kinds of requests that shouldn't be pipelined (PUT requests, for instance), and some older servers may not like it. However, I think we're moving pretty quickly towards a time where it can be made the default.
"Ladies and gentlemen, my killbot features Lotus Notes and a machine gun. It is the finest available."
Good introductory overview in general. Kudos.
- I don't need to go outside, my CRT tan'll do me just fine.
That's the idea. Noscript uses a "whitelist". It blocks scripting on ALL sites unless you specifically allow those sites.
I personally love it! Client side scripting is becoming more and more of a danger. If you look at a lot of the recent browser security problems, many have been client side scripting exploits.
So I know I for one prefer to only script on sites I trust. The rest get blocked. That's fine by me and I don't consider it a hassle at all. In fact, I won't even use a browser on my box without Noscript! I even stopped using Opera because of it.