What are the differences between normal and slim package of jquery?

后端 未结 7 1182
旧巷少年郎
旧巷少年郎 2020-11-22 03:27

At CDNJS jquery.slim package is placed. It has a smaller size. What are the major differences from an original? A quick look at the code didn\'t bring the answer, and at the

7条回答
  •  有刺的猬
    2020-11-22 03:58

    The jQuery blog, jQuery 3.1.1 Released!, says,

    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.

提交回复
热议问题