jquery-min版本?

ajs*_*sie 17 javascript jquery minify

我注意到大多数JavaScript库(例如,jQuery)总有一个"min"版本(代表mini?).

有什么不同?功能较少但尺寸较小?

这是某人应该考虑使用的东西吗?(那里有很多最小版本.)

Leo*_*Leo 16

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 ;-)


Sam*_*son 10

...在计算机编程语言中,尤其是JavaScript,是从源代码中删除所有不必要的字符而不改变其功能的过程.

http://en.wikipedia.org/wiki/Minification_(programming)


Dan*_*ite 7

它被"缩小"了.所有的功能都在那里,只是在一个较小的版本中,它更小,以节省传输带宽.

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;
}
Run Code Online (Sandbox Code Playgroud)

could be come

function myFunction(a){b=a;}
Run Code Online (Sandbox Code Playgroud)