views:

98

answers:

4

I notice on bad quality websites with ads a piece of the site will load then stall for seconds then load in the rest of the site. With AdBlock it loads very quicky. What is causing the stall? Is there a simply way around it?

A: 

They stall because the page can't complete until calls are made to ad servers, which may be down or busy or just slow for other reasons. You see this a lot with doubleclick, etc. I even saw it on StackOverflow a few weeks ago! :)

Robusto
+1  A: 

What is causing the stall?

The ads. They are usually loaded from a completely unrelated domain/server. Often there is also JavaScript involved, which slows down things even further.

Is there a simple way around it?

As a content creator, don't include too many ads from different domains on a single page. As a user, surf with AdBlock or similar ad-blocking software.

RegDwight
For every add it´s another HTTP request. Usually loads of JavaScript as RegDwight says but also often plugins (e.g. flash) that must be initialized.
anddoutoi
+2  A: 

Many ads are served via JavaScript includes. This presents a problem when they don't load, because many browsers delay rendering the page until all JavaScript has loaded (because of cases like this, where the JS might output HTML and the browser has no way to anticipate what it might be).

AdBlock prevents the request for the ad JS from ever happening, and thus the site loads quicker.

beamrider9
So its because the javascript must load AND run?
Yes - moreso because the page waits for the remote javascript to load before it continues to display the rest of the page. So if the javascript that is on the ad server is taking a long time... the page waits and waits. Some developers try to code a page and then defer the ad calls until after the page has loaded, but this may be problematic with some types of ads.
liquidleaf
A: 

Here's another viewpoint. Sometimes it is intentional that the page displays an ad and then pauses before continuing to render the page. This is an attempt to make the ad stand out from the rest of the page content. It focuses the user's eye only on the ad, because that is the only thing there.

In these cases: It's not a bug, it's a feature.

DOK
Does this really happen on some sites? I've never seen this. It's horrific!
Marcel Korpel