Examples | Help
stevesouders.com
 Cuzillion'cuz there are a zillion pages to check
Scripts Block Downloads
posted by Steve Souders, March 26, 2008 10:10 AM
The way external scripts are typically loaded is with the SCRIPT SRC attribute. Unfortunately, this blocks the browser from downloading any other resources in parallel until the script is done. It also blocks any progressive rendering in the page below the script. Notice if you click the Reload button how everything above the horizontal line is rendered, but the rest of the page remains blank for about 8 seconds. (Right below the line are two scripts that each take 2 seconds to download plus 2 seconds to execute. Loaded sequentially, they block the page for 8 seconds.) These problems are going to become worse as web sites move to using more and more JavaScript. Fortunately there are several ways to avoid these issues as shown in the remaining examples.

 
<HTML> <HEAD>
    </HEAD> <BODY>
      </BODY> </HTML>