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?
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?
It does not have:
So it gets smaller. If you do not need these things, it's best to use it.
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
; jQuery.ajaxSettings.xhr
, jQuery.ajaxPrefilter
, jQuery.ajaxSetup
, jQuery.ajaxPrefilter
, jQuery.ajaxTransport
, jQuery.ajaxSetup
;
jQuery.parseXML
; jQuery.easing
, jQuery.Animation
, jQuery.speed
, since there are other ways to get what you want. 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?