I have the following JQuery libraries and I need to combine them in order to fasten up my web pages. Whats the best way and do some of them include the other ones in it, or can I find it some where, minified version that is.
JQuery.v1.6.4.js
jquery.tools.min.js
jquery-ui-1.8.16.custom.min.js
jquery.hoverIntent.minified.js
jquery.alphanumeric.pack.js
jquery.dcmegamenu.1.3.3.js
hero_image_slideshow.js
Thanks.

- 829
- 1
- 7
- 19
7 Answers
You can use httpcombiner if you are using asp.net. http://archive.msdn.microsoft.com/HttpCombiner Or else you can use yui compressor http://developer.yahoo.com/yui/compressor/ http://www.refresh-sf.com/

- 1,127
- 2
- 7
- 21
Take a look at Google Closure Compiler.
http://code.google.com/closure/compiler/
Not only can you use it to concatenate the files for you, it will do other optimizations including minification, etc.

- 116
- 2
This is very related to a similar question about combining jscript files. A possible solution is compressJS, which uses the Google Closure Compiler in turn.

- 1
- 1

- 5,412
- 1
- 28
- 28
- Combine and Minify JavaScript so that it is a smaller download and runs faster
- GZIP your JavaScript so it is a smaller download across the network
- Place your JavaScript on a CDN such as Akumai, Lime Light or Cloudfront
I do this for my ecommerce development business with very speedy results.

- 25,132
- 12
- 90
- 84
Is server-side combine an option? In that case, what are you running the site on? If you're using .NET, I highly recommend Combres.
For PHP sites, try minify.
Scott Hanselman blogged about a batch script for the same purpose using AjaxMin. You could include that as part of a build script, for instance, if you can't/don't want to combine the files at runtime.
One of the benefits of on-the-fly combining/minifying is that you can decide to turn it off for requests from your IP address, for instance, so that you will always be able to read the original script, if you're debugging live code.

- 128,221
- 31
- 203
- 222
Try out the online tools at jscompress.com it seems reasonably good.
You can either copy > paste your code in, or upload your js files and it will compress them for you.