This page is inteneded to test how the async attributes affects execution order of script-inserted scripts. In Firefox, scripts execute in the order in which they were inserted; however, setting the async flag to true alters the execution order and allows scripts to execute ASAP.
Unfortunately, this is not the case for a non-remote script element; however, since scripts are deemed to be remote if they contain a SRC attribute, we can "trick" Firefox into believing our local script is remote using a data:uri.
Interestingly, scripts with a data:uri as their src attribute are actually executed sooner than one with just the text attribute set. Note how, in FF 3.6, the first script to load is the last to be inserted. The unforuntate issue here, however, is that, unlike the behavior we see in WebKit and Internet Explorer, script is not executed synchronously.
| # | insertion order | async? | remote? | delay (ms) | duration (ms) |
|---|
This image will delay the window.onload event by two seconds.