What are the differences between normal jQuery and slim versions?

Asked

Viewed 1,593 times

6

In the latest version of jQuery, 3.0, it was announced the version slim. What is the difference of this version slim for the regular jQuery 3.0 version?

2 answers

5


Slim does not own:

  • the AJAX modules, because it is common for people to use another mechanism better or not need this,
  • animation effects, since it has better ways to get the same result,
  • what is considered deprecated, but that is kept in the full version because many people still use.

So it gets smaller. If you don’t need these things, you better use it.

Ad that talks about it.

4

In the jQuery 3.0 release version, was also announced the version slim (slender, thin, light) to which removed some functions, that you might not want to use, or that you already used/preferred to use in another library standalone, 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 the desired.

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 file size slim (gzip) is approximately 6k smaller than the standard version, 23.6k vs 30k.


If you don’t need what was quoted, or already use it in a way standalone, it is recommended that you use the version slim jQuery, since you have no reason to carry that which you will not use, is not?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.