View Full Version : Best Way to Reference JavaScript Code?

01-09-2007, 09:11 PM
What is the best way to reference JavaScript code, inline or external?

Normally we reference scripts in one external JS file, but in this case we have 6 different HTML files with 6 associated JS functions. Currently we are referencing all 6 functions in one external file. We were wanting to move each function within each HTML file, but we didn't know if it was best to have the script inline or in individual external script files.

Thoughts, opinions?

01-09-2007, 09:15 PM
You do it external so that the browsers can cache the page and js file independently of each other.