Hello,
When using the <a href="http://ajaxpatterns.org/On-Demand_Javascript">
On-demand Script Pattern</a> it is often helpful to abort retrieval of
a remote script if it is taking longer than a given time. An example
of this might be an application that periodically updates a page by
attaching a script element. If the script has not returned within the
update interval, any data returned by the script would be considered
"stale" and only the new data would be needed.
In IE and WebKit, this can be accomplished by removing the script
element from the DOM. Moreover, creating and attaching a new script
element without removing the first will not be blocked. This,
however, does not appear to be the case in FireFox. Since Firefox
seems to guarantee execution order will match insertion order, the
first script must hit the network timeout before any subsequent
scripts can be executed.
Is there a way to specify the timeout period or to abort retrieval
(and the ensuing blocking) from occurring so other scripts (that may
have all ready finished downloading) can continue to execute?
Thanks,
Will