jQuery中slim版本與普通版本的區別


在jQuery3中,推出了一個slim版本。slim,百度翻譯:細長的; 苗條的,纖細的; 微小的; 無價值的。

區別概述:

slim即簡化版,比普通版本缺少Ajax和特效模塊模塊。

官方發布地址: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 壓縮后)。

大小截圖:

用過Bootstrap4的同學會發現,官方手冊中介紹中,默認使用的jQuery就是slim版本。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM