[thelist] [fwd] Javascript and the LINK Element
Sam-I-Am
sam at sam-i-am.com
Thu Sep 13 17:12:44 CDT 2001
except you mean script src?
The only thing to watch for here is that you don't pile too much library
code into one file. It's easy to get into a situation where you're
requiring a download of 30k just so you mouseover handler is available.
That said, whenever I'm doing a template, I like to put an external js
call in there, even if I'm not currently using any javascript... it's
future proofing, and time and again I've ended up putting stuff into the
hitherto empty library.js because some new requirement surfaced, or to
implement some feature the client requested post-delivery.
Sam
Richard Bennett wrote:
>
> Using <link> shouldn't be any slower, and has the advantage that the .js
> files stay in the browsers cache, and are only downloaded once. So your page
> is faster on return visits, and on pages sharing the same script.
>
More information about the thelist
mailing list