views:

61

answers:

3

Jquery.com provide 2 version of jquery library. I always use Minified version because i never edit anything in jquery base file. but what is the use and purpose of another Uncompressed Code version? Does people edit main library file to get something?

If yes then if we edit anything in main file then we can't use google ajax library link.

Production (19KB, Minified and Gzipped)   
Development (120KB, Uncompressed Code)
+5  A: 

It just makes it much easier to read the source code of jQuery, especially during debugging to see what is happening with a problem in your application.

Robert Harvey
+1  A: 

It's for Debugging (although I would argue that if you're using jQuery, you should be looking through the source to understand it).

In ASP.NET at least, when using the ScriptManager control, you can assign one script to use in Debug mode and another to use in Release mode, so using the uncompressed version in debug allows you to step through the source and figure out if an issue you're having is coming from there, but when you finally build the release, you'll use the minified and gzipped version.

Russ Cam
+3  A: 

If you're using the minified version during development, browsers will tell you there's an error on line X, but line X might consist of hundreds or even thousands of lines of uncompressed code. This makes it very, very difficult to figure out what exactly caused the problem.

Developing against uncompressed code thus allows you to see what's causing problems and fix. Minified jQuery should always be used in production, and the core functionality of jQuery shouldn't be tweaked - that's what plugins are for.

ceejayoz