Forum Moderators: open
inline script advantage: Loads with html, so it loads fast
inline script disadvantage: hard use on multiple pages
external script advantage: easy maintenance, easy to use on multiple pages
external script disadvantage: it requires an extra GET from the browser. So it's a bit slower... But who cares with 2Mbit ADSL ;)
I always go for external files. Pure for easy maintenance...
Personally, to get the fastest load on my home page, I use an internal script, all other pages use external.
Along the same lines, if you only use particular scripts on a few pages, you may wish to put those scripts in a separate external file and link to them only on pages that need them.
(That may be obvious, but perhaps it is worth mentioning. I have seen too many sites that include all javascripts used on the site in one large file, forcing the user to download the whole thing on the first page they visit, even if some of the scripts are used only very occasionally. Two or three files, each with groups of related scripts, might serve them much better. For that matter, it makes organizing and maintaining the scripts much easier.)
Actually, since each separate file requires a separate HTTP request and its own TCP packets, the first request for an external file will always be slower to load than an internal script.
Additionally, depending on the specific cacheing instructions for the external file in question, in many cases each time it is called by a new page being loaded in the browser, an HTTP request is generated that produces a 304 "Not Modified" response from the server. Usually this overhead is minimal compared to retransmitting the file or even the bytes of a duplicate internal script (unless it is very short), but it is overhead.
All else being equal, that is comparing a locally cached file with internal scripts vs. a locally cached file with locally cached external scripts, the first case will still load faster because of lower file system overhead. Since we're talking milliseconds in that case, it's pretty moot, but still a reality. Two files are just more overhead than one.
The real savings in external files come from not having to retransmit the same data and ease of maintenance.