[thelist] JavaScript - linking v. embedding

Norman Bunn norman.bunn at craftedsolutions.com
Thu Jun 10 12:36:16 CDT 2004

My general rule of thumb is to use linked when used on more than one 
page and embedded when used once.  The reason is that browsers can cache 
the linked file, thus saving load time and improving execution speed.


Norman W. Bunn
norman.bunn at craftedsolutions.com
Crafted Solutions, Inc.
Web Design & Development
Web Site Hosting & Custom Solutions
"Get the results the Internet promises;
  get the 'Net Result' from Crafted Solutions!"

David Siedband wrote:
> Are there guidelines for when javascript should be linked as a separate 
> file and when it should be embedded?
> Are there variations in how browsers treat these two options?
> thx
> -- 
> David

More information about the thelist mailing list