jquery.js和jquery.lite.js有什么区别? [英] What is difference between jquery.js and jquery.lite.js?
问题描述
当我下载jQuery zip文件 LINK 时.它给了我4个不同的文件:
When I download the jQuery zip file LINK. It gives me 4 different files:
- jquery.js
- jquery.lite.js
- jquery.min.js
- jquery.pack.js
pack.js
是该js文件中压缩程度最高的文件,而min
则被最小化.
所以我有两个问题...
pack.js
is the most compressed one of that js file and min
is minified.
So I have two questions...
-
jquery.js
和jquery.lite.js
之间的区别是什么.当我查看代码时,看起来没有什么区别. - 在实时网站上使用
min.js
或pack.js
有什么更好的选择?
- What is difference between
jquery.js
andjquery.lite.js
. There looks to be no difference when I view code. - What is better to use
min.js
orpack.js
on a live website?
推荐答案
问题的答案:
jquery.js -完全扩展,包括注释.
jquery.js - Full expanded including comments.
jquery.lite.js -不再真正相关-新版本不再提供此功能-主要用于缺少注释和较少使用的功能.
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 -当今主要使用-删除了所有空格和注释.
jquery.min.js - The main one to use nowadays - all whitespace and comments removed.
jquery.pack.js -体积较小-但需要解包"时间,有点像rar/zip.
jquery.pack.js - Smaller in size - but requires 'unpacking' time, sort of like a rar/zip would.
但是,老实说,如果其他人提到过,请尽可能使用jQuery的最新版本.
But honestly, as others have mentioned use the latest release of jQuery if possible.
-
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.
地图文件-帮助开发人员/网络浏览器在压缩JS代码之前找到对JS代码原始位置的引用.
Map file - Helps developers/web browsers find references to the original location of JS code before it was compressed.
苗条的身材-此版本的jQuery不包含一些较大的库,例如AJAX和效果模块.
Slim builds - This version of jQuery doesn't include a few larger libraries, such as the AJAX and effects modules.
这篇关于jquery.js和jquery.lite.js有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!