Jenson M John
Jenson M John

Reputation: 5689

jQuery Full & Minified version major functionality differences?

I wonder what are the functionality differences in jQuery (jQuery*.js) full & Minified (jQuery*.min.js) Versions.

http://code.jquery.com/jquery-latest.js

http://code.jquery.com/jquery-latest.min.js

I know there is a difference in size But Any functionality differences?

Cheers.

Upvotes: 0

Views: 182

Answers (3)

user2625787
user2625787

Reputation:

Wikipedia says this:

Minification (also minimisation or minimization), in computer programming languages and especially JavaScript, is the process of removing all unnecessary characters from source code without changing its functionality.

http://en.wikipedia.org/wiki/Minify

So, none.

One reason you have the choice of uncompressed is so you can examine the source code to track down a bug if you need to. In theory, anyway.

Upvotes: 1

Justin Wood
Justin Wood

Reputation: 10061

There are no functional differences.

The minified version just has all the of the line breaks and space characters, and anything else that isn't necessary for Javascript to work, removed.

Other than that, they are functionally identical.

EDIT: As noted by SLaks, it also changes names where safe. Safe meaning it is not publicly available.

This means that it it could change an internal variable from register to a. Similarly, it could change a function name from perform() to b().

Please note that those are just examples, and are most likely not in the code itself.

Upvotes: 1

SLaks
SLaks

Reputation: 887529

The only difference is the size of the code.

Any functional difference is a bug, and should be reported to the minification tool.
jQuery is minified by UglifyJS.

Upvotes: 1

Related Questions