Examples | Help
stevesouders.com
 Cuzillion'cuz there are a zillion pages to check
IE Ensure Ordered Execution
posted by Steve Souders, April 2, 2008 10:58 PM
In Internet Explorer the Script Defer approach is the best way to download scripts in parallel while ensuring they are executed in the order specified. In this example, the first script has a 3 second download delay. Even though the other scripts download faster, the first script is still executed first as shown by the 'sleep=3' in the URL.

 
<HTML> <HEAD>
  • external script

    on domain1 with a 3 second delay with a 1 second execute time using HTML tags with defer

  • external script

    on domain2 with a 2 second delay with a 1 second execute time using HTML tags with defer

  • external script

    on domain3 with a 1 second delay with a 1 second execute time using HTML tags with defer

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