Jquery 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 Unpressed 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, Unpressed Code)
Jquery. 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 Unpressed 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, Unpressed Code)
Share
Improve this question
edited Dec 23, 2009 at 16:49
Jitendra Vyas
asked Dec 23, 2009 at 16:41
Jitendra VyasJitendra Vyas
153k240 gold badges586 silver badges867 bronze badges
3 Answers
Reset to default 5If 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 unpressed code. This makes it very, very difficult to figure out what exactly caused the problem.
Developing against unpressed 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.
edit 5/2014: Source maps have been implemented in many browsers to allow debugging of minified code. https://developers.google./chrome-developer-tools/docs/javascript-debugging#source-maps
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.
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 unpressed version in debug allows you to step through the source and figure out if an issue you're having is ing from there, but when you finally build the release, you'll use the minified and gzipped version.