When I download the jQuery zip file LINK. It gives me 4 different files:
pack.js
is the most compressed one of that js file and min
is minified.
So I have two questions...
jquery.js
and jquery.lite.js
. There looks to be no difference when I view code.min.js
or pack.js
on a live website?Answer to the question:
jquery.js - Full expanded including comments.
jquery.lite.js - Not really relevant anymore - new releases don't give this - it mainly used to lack comments and less used features.
jquery.min.js - The main one to use nowadays - all whitespace and comments removed.
jquery.pack.js - Smaller in size - but requires 'unpacking' time, sort of like a rar/zip would.
But honestly, as others have mentioned use the latest release of jQuery if possible.
-
Updated information for 2018:
Compressed production - Removal and minification of code, no spaces/line breaks, hard for humans to read but smaller in size so it loads faster.
Uncompressed production - Larger file size, easier for developers to work on but shouldn't be used in production due to unnecessary file size.
Map file - Helps developers/web browsers find references to the original location of JS code before it was compressed.
Slim builds - This version of jQuery doesn't include a few larger libraries, such as the AJAX and effects modules.
If you're looking for a CDN, use Microsoft or Google cdn:
https://developers.google.com/speed/libraries/devguide#jquery
or
http://www.asp.net/ajaxlibrary/cdn.ashx#jQuery_Releases_on_the_CDN_0
Use the latest version, the .lite.js
is not an official jQuery version, same for the .pack.js
.
On the jQuery website you can only find Production (Minified) or Development (not Minified) versions.
Here: http://docs.jquery.com/Downloading_jQuery you'll find all the official information about versions of jQuery.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With