1. Home
  2. Computing & Technology
  3. Web Design / HTML

Put Scripts in External JavaScript Files to Speed Page Downloads

By Jennifer Kyrnin, About.com

External JavaScript will help you speed up the download of your Web pages. You might think that it wouldn't matter - after all, if a Web page needs the scripts, the browser will download it. And yes, if your customer only ever sees one page on your site the scripts will be downloaded.

But once they're downloaded, they are cached. Once your scripts are cached, each subsequent page that is downloaded only requires the browser to download the HTML.

Placing JavaScript embedded in the page also requires that each page be maintained separately. So, maintaining your scripts in embedded files, you help your customers and keep your maintenance work down.

More Web Design / HTML Quick Tips

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. Testing Your Web Pages
  5. Web Site Optimization
  6. Put Scripts in External JavaScript Files to Speed Page Downloads

©2008 About.com, a part of The New York Times Company.

All rights reserved.