Skip to main content

jquery-min version?



i noticed that there is always a min version (stands for mini?) to most of the js libraries eg jquery.





what is the difference? less functions but smaller size?





is this someone should consider to use? (there are a lot of min versions out there)



Source: Tips4all

Comments

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

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

    ReplyDelete
  3. 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;}

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

    ReplyDelete
  5. 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

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

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

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

    ReplyDelete

Post a Comment

Popular posts from this blog

Why is this Javascript much *slower* than its jQuery equivalent?

I have a HTML list of about 500 items and a "filter" box above it. I started by using jQuery to filter the list when I typed a letter (timing code added later): $('#filter').keyup( function() { var jqStart = (new Date).getTime(); var search = $(this).val().toLowerCase(); var $list = $('ul.ablist > li'); $list.each( function() { if ( $(this).text().toLowerCase().indexOf(search) === -1 ) $(this).hide(); else $(this).show(); } ); console.log('Time: ' + ((new Date).getTime() - jqStart)); } ); However, there was a couple of seconds delay after typing each letter (particularly the first letter). So I thought it may be slightly quicker if I used plain Javascript (I read recently that jQuery's each function is particularly slow). Here's my JS equivalent: document.getElementById('filter').addEventListener( 'keyup', function () { var jsStart = (new Date).getTime()...

Is it possible to have IF statement in an Echo statement in PHP

Thanks in advance. I did look at the other questions/answers that were similar and didn't find exactly what I was looking for. I'm trying to do this, am I on the right path? echo " <div id='tabs-".$match."'> <textarea id='".$match."' name='".$match."'>". if ($COLUMN_NAME === $match) { echo $FIELD_WITH_COLUMN_NAME; } else { } ."</textarea> <script type='text/javascript'> CKEDITOR.replace( '".$match."' ); </script> </div>"; I am getting the following error message in the browser: Parse error: syntax error, unexpected T_IF Please let me know if this is the right way to go about nesting an IF statement inside an echo. Thank you.