Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery-min version?

I noticed that there is always a "min" version (stands for mini?) for most JavaScript libraries (e.g., jQuery).

What is the difference? Less functionality but smaller size?

Is this something someone should consider using? (There are a lot of min versions out there.)

like image 952
ajsie Avatar asked Jan 15 '10 13:01

ajsie


People also ask

What is jQuery min js?

min. js is a compressed version of jquery. js (whitespaces and comments stripped out, shorter variable names, ...) in order to preserve bandwidth. In terms of functionality they are absolutely the same. It is recommended to use this compressed version in production environment.

Is jQuery 1 still supported?

jQuery 1. x and 2. x are indeed EOL, but that doesn't mean that they have any very serious known security issues.

Is jQuery 3.6 backwards compatible?

jQuery seems to be nicely backward compatible. I have been using it for more than a couple of years now through several versions of the core and have not had issues when upgrading except a few minor ones with some plugins.


8 Answers

The functionality is exactly the same - just open the minified and the "normal" versions in a text editor and you'll see the difference.

The min-Versions are just there to provide reduced filesize, to save you bandwith and traffic ;-)

like image 89
Leo Avatar answered Oct 06 '22 22:10

Leo


...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/Minification_(programming)

like image 23
Sampson Avatar answered Oct 07 '22 00:10

Sampson


Its been "minified". All the functionaility is there, just in a minified version that is smaller for saving transfer bandwidth.

Things to become "minified":

  • Remvoing whitespace
  • Renaming some variables - such as function-scoped variables, not function names.

Here is an example

function myFunction(someReallyLongParamName)
{
    someReallyCrazyName = someReallyLongParamName;
}

could be come

function myFunction(a){b=a;}
like image 21
Daniel A. White Avatar answered Oct 07 '22 00:10

Daniel A. White


Minified versions just have whitespace removed, to make them faster to download. Otherwise, they are identical.

like image 40
Steve Cooper Avatar answered Oct 06 '22 23:10

Steve Cooper


no, exactly the same function, the text has been minimized to reduce the download, this means you cant really debug in it but you do get the same functionality

like image 25
Pharabus Avatar answered Oct 06 '22 22:10

Pharabus


Smaller size because all of the white space is removed from the file. Just open both files in text editor and you will see.

like image 29
Jeremy H Avatar answered Oct 07 '22 00:10

Jeremy H


This is a version of jQuery that has a smaller file size (minified). Same functions, just a smaller file that the browser has to download.

like image 32
Tim S. Van Haren Avatar answered Oct 07 '22 00:10

Tim S. Van Haren


same functions...smaller size. Think of it as poor mans compression. They simply remove all unneccessary whitespace.

like image 29
Vincent Ramdhanie Avatar answered Oct 06 '22 22:10

Vincent Ramdhanie