在CDNJS jquery。纤细的包裹被放置。它的尺寸更小。与原作的主要区别是什么?快速查看代码并没有带来答案,在https://jquery.com我没有找到任何关于苗条包的参考资料。
那么,jquery.js和jquery.slim.js之间有什么区别呢?
在CDNJS jquery。纤细的包裹被放置。它的尺寸更小。与原作的主要区别是什么?快速查看代码并没有带来答案,在https://jquery.com我没有找到任何关于苗条包的参考资料。
那么,jquery.js和jquery.slim.js之间有什么区别呢?
当前回答
当我想使用jQuery UI时,有一个很大的不同,使用jQuery的精简版本,这是不可能的。事实上,精简版不包括ajax和effects模块
其他回答
如上所述,Ajax和特效模块已经被排除在jQuery slim之外,缩小版解压后的尺寸差异为85k vs 69k(精简版节省16k)或压缩版30vs24,需要注意的是,bootstrap 4使用的是精简版jQuery,所以如果有人想要完整版,他们需要调用它
jQuery博客,jQuery 3.1.1发布!说,
Slim build Sometimes you don’t need ajax, or you prefer to use one of the many standalone libraries that focus on ajax requests. And often it is simpler to use a combination of CSS and class manipulation for all your web animations. Along with the regular version of jQuery that includes the ajax and effects modules, we’ve released a “slim” version that excludes these modules. All in all, it excludes ajax, effects, and currently deprecated code. The size of jQuery is very rarely a load performance concern these days, but the slim build is about 6k gzipped bytes smaller than the regular version – 23.6k vs 30k.
我能看到美元。从jQuery中移除ajax
来自jQuery文档
你也可以使用精简版,它排除了ajax和效果模块
以下是精简版删除功能后的评论
/*! jQuery v3.2.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector | (c) JS Foundation and other contributors | jquery.org/license */
下面是jQuery 3.0最终版发布公告中的简短回答:
除了包含ajax和effects模块的常规jQuery版本外,我们还发布了一个不包含这些模块的“精简”版本。总而言之,它排除了ajax、特效和当前已弃用的代码。
文件大小(gzip)大约小了6k, 23.6k vs 30k。
我发现在创建表单联系人时有一个区别: 苗条(boostrap 4.5推荐):
在发送电子邮件后,全局变量卡住了,这使得如果用户给出f5(重载页面),它会再次发送。 分钟: 之前的错误将被解决。我多么痛苦啊!