What are the differences between the normal jQuery and the slim versions?

4

In the latest version of jQuery, 3.0, the slim version was announced. What are the differences of this slim version for the regular jQuery 3.0 version?

    
asked by anonymous 15.12.2016 / 23:24

2 answers

4

It does not have:

  • AJAX modules, because it is common for people to use a better one or do not need it,
  • animation effects, since you have better ways of getting the same result,
  • What is considered deprecated , but which is kept in the full version because a lot of people still use it.

So it gets smaller. If you do not need these things, it's best to use it.

Ad that talks about this .

    
15.12.2016 / 23:30
3

In the release version of jQuery 3.0 , it was announced also the slim version (slim, thin, light) which removed some functions , which you might not want to use, or that you already used / preferred to use in another standalone library, and even functions that were obsolete.

Some of these functions were:

  • jQuery.fn.extend ;
  • jQuery.fn.load ;
  • jQuery.each ;
  • jQuery.expr.filters.animated ;
  • AJAX settings such as jQuery.ajaxSettings.xhr , jQuery.ajaxPrefilter , jQuery.ajaxSetup , jQuery.ajaxPrefilter , jQuery.ajaxTransport , jQuery.ajaxSetup ;
  • Parse of XML as jQuery.parseXML ;
  • Animation effects such as jQuery.easing , jQuery.Animation , jQuery.speed , since there are other ways to get what you want.

Addendum

  • Related to the last topic, it is often simpler to use a combination of CSS and class manipulation to make your web animations.

  • And the size of the slim (gzip) file is approximately 6k lower than the default version, 23.6k vs 30k.

If you do not need the standalone , it is recommended that you use jQuery slim version, since you have no reason to you keep carrying what you will not use, will you?

    
31.08.2017 / 17:13