I am new to Jquery and I need some help choosing which version is the best version too take.
They got 3 Versions
1. Minified 2. Uncompressed 3. Packed
It say's on there site that Uncompressed is best for testing and learning. I am wondering why is this so? Is it because it can be opened up and has full comments?
I also heard that if you use Minified and gzip it that is the best since you get some crazy compression what I am guessing is alot better because the people who come to your site can download it alot faster compared to the uncompressed.
I don't know if it is that big of deal these day's since everyone is starting to get alot faster internet connections. However I rather use the smaller package if there is basic no downside to it(ie does everything the uncompressed one does).
I am wondering do alot of people use the uncompressed one in their production environment and then download the minified one and gzip it when its time to launch?
Also is there an alternative to gzip? Because I don't think I can use gzip since my site will hosted on a windows machine(using asp.net with c#). I also heard that the packed version is not really that good. It maybe smaller but takes more time to unpack it and stuff.
So are there any other ways I can get by this with the smallest size possible and no cost of performance or anything else?
Also one more question with the gzip one. How does that work anyways? like do you just put the gzip file location in the the script tags up in the header and it knows what to do? or do you got to do something special for it to work?
Thanks [ June 08, 2008: Message edited by: Michael Hubele ]
The uncoompressed one is good for learning because you can look at the code, as you stated. Other than that its just size. Size does matter. And oddly enough, the smaller the better. That's really about all there is to this. Smaller size equals faster load although most browsers cache scripts anyway so even then, considering the uncompressed version is only 97kb, it really doesn't matter.
The jQuery team recommends using the minified version for production environments. The packed version is smaller, but needs run-time processing to unpack.
Even though the clear-code version isn't all that big (as these things go), it's quite common to use more than a few plugins with the core jQuery library. (In a recent project I ended up including 14 jQuery-related script files).
At that scale, minified versions make a significant dent in the download footprint. [ June 08, 2008: Message edited by: Bear Bibeault ]
With regards to gzipping, it's not a simple matter of your zipping up the file yourself. The appropriate response headers need to be set in order to let the browser know that the response body needs to be unzipped. So either your web server needs to be set up to do the zipping, or you need to write your own server-side code to intercept the request for the file and serve the gzipped version while setting the appropriate response headers. [ June 08, 2008: Message edited by: Bear Bibeault ]