Problems including Javascript from external servers

Some considerations about problems which can occurr when including javascript from external servers.

Javascript file doesn't exist

The script wants to include a javascript file which doesn't exist on the specified location.

This causes no problem for the performance of this script, because the browser get immediatlely from server the notification that the requested file doesn't exist.

[ Example]

The execution of the included javascript exceeds the maximum execution time for script code

The whole script hangs whereever the <script></script> is located.

[ Example]

External server is down

If the external server (on which the javascript file to be included resides on) is down (or very slow) the HTML code above the line with the include statement is executed and printed to the web page. This works for Firefox, Internet Explorer and Opera.

[ Example] [needs apache on geek2 to be stopped]

AJAX call hangs

A complete loaded javascript file calls per AJAX an external script which execution hangs.

The main page is displayed except of this part which is computed by the AJAX call.

[ Example]

<script type="text/javascript" src="xxx" /> don't work with Internet Explorer

This don't work in Internet Explorer 7 and don't result in an error or warning but in an empty page.

[ Example]

CompleteSearch: completesearch/NotesToJavascript (last edited 2007-11-09 23:49:35 by dslb-084-059-007-005)