jquery-min version?

前端 未结 8 1058
忘掉有多难
忘掉有多难 2020-12-17 10:17

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 smal

相关标签:
8条回答
  • 2020-12-17 10:55

    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

    0 讨论(0)
  • 2020-12-17 10:56

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

    0 讨论(0)
  • 2020-12-17 10:57

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

    0 讨论(0)
  • 2020-12-17 10:58

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

    0 讨论(0)
  • 2020-12-17 11:05

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

    0 讨论(0)
  • 2020-12-17 11:12

    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;}
    
    0 讨论(0)
提交回复
热议问题