• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

12. Dreamweaver Behaviors > 12.5. Creating an External JavaScript Library

Creating an External JavaScript Library

You’ll use some Dreamweaver behaviors constantly. The basic rollover image, for example, is so useful for navigation bars, you may end up putting it on every page of your site.

Unfortunately, each time you add a behavior to a page, Dreamweaver adds lines of JavaScript code as well—and more code means slower downloads.

One way to decrease download time is to put frequently used JavaScript programs into a separate file containing nothing but JavaScript, and then link that file to each page that uses the script. Once your visitors’ Web browsers load and cache this JavaScript library file, they don’t have to waste time loading it again. Every page in your site that uses, say, Dreamweaver’s Swap Image behavior needs just a single line linking it to the JavaScript file, instead of lines and lines of code.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint