JavaScript has been a fixture in web applications for many years now and it can have a serious impact in the performance of a web page.  First off JavaScript (js) is just text so these files can benefit significantly from compression.  I've been shocked in the past to see a js files that were over 500K in size and not compressed.  In older browsers there were issues related to the caching of compressed js files but these bugs do not exist with more current versions of the browser so there is nothing stopping you from compressing these files.  If you do still have a few customers that are using older browsers some Application Delivery Controllers like BIG-IP offer an option to avoid browser bugs - this will not compress the files with browsers that are known to have issues.  JavaScript

As previously mentioned before Internet Explorer 8 or Chrome browsers would download scripts sequentially.  The browser would wait until 1 script had completely downloaded prior to downloading the next file.   This blocking behaviour means that nothing that exists below the script currently being downloaded is able to be rendered or download the user is just sitting and looking at a blank white screen  Depending on the number of files and how long it takes them to download the files the user could be staring a blank screen for quite a while.  Take for example the screen shot on the right,  you can see from the time chart in HttpWatch that there are 8 js files that are downloaded sequentially.  In this case the 8 files only took about 1 second to download but there was very little latency.  The higher the latency the longer it will take for these files to download.  Be aware of how many external calls are being made and what browsers are being used by your visitors. 

Even if you do have multiple js files these only need to be downloaded on the first visit afterwards these can be served from the local cache.  The majority of js files are relatively static which means these can safely be cached on the local browser for a lengthy time.  Using features like Intelligent Browser Referencing in WebAccelerator allows far future expires times to be set but still ensures fresh content will be served.