jquery slim是什么

jquery slim是什么,第1张

jquery slim是什么

jquery slim指的是jquery简化瘦身版本,比普通标准版本缺少了Ajax和特效等模块,因此文件也比标准版本小:slim版本的压缩大小是23.6kb,而标准版本的大小是30kb。

本教程 *** 作环境:windows7系统、jquery3.3.1版本、Dell G3电脑。

jQuery3.0之后除了标准版本之外,还推出了一个全新的模式版本,我们可以称之为瘦身的版本,官方命名为“Slim”。

slim,百度翻译:细长的; 苗条的,纤细的; 微小的; 无价值的。

区别概述:

slim即简化版,比普通版本缺少Ajax和特效等模块。如果你不使用 AJAX、效果等功能,就可以选择使用这个廋身版“Slim”的 jQuery,它的压缩大小是 23.6kb,而标准版本的大小是 30kb。

官方发布地址:http://blog.jquery.com/2017/03/20/jquery-3-2-1-now-available/

说明原文

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

谷歌翻译:

有时你不需要Ajax,或者你更喜欢使用专注于Ajax请求的独立库中的一个。 对于所有的Web动画,通常使用CSS和类 *** 作的组合更为简单。 除了包含ajax和特效模块的常规jQuery版本之外,我们还发布了一个排除这些模块的“超薄”版本。 jQuery的大小现在很少是一个负载性能的问题,但是超薄的版本比普通版本小了大约6k个字节(23.6k VS 30k 压缩后)。

【推荐学习:jQuery视频教程、web前端入门教程】

以上就是jquery slim是什么的详细内容,

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/699540.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-23
下一篇 2022-04-23

发表评论

登录后才能评论

评论列表(0条)

保存